Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testdata/scripts/nodes: add tests for cosmos, solana, starknet #15365

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions testdata/scripts/nodes/cosmos/list/list.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# start node
exec sh -c 'eval "echo \"$(cat config.toml.tmpl)\" > config.toml"'
exec chainlink node -c config.toml start -p password -a creds &

# initialize client
env NODEURL=http://localhost:$PORT
exec curl --retry 10 --retry-max-time 60 --retry-connrefused $NODEURL
exec chainlink --remote-node-url $NODEURL admin login -file creds --bypass-version-check

exec chainlink --remote-node-url $NODEURL nodes cosmos list
cmp stdout out.txt

-- testdb.txt --
CL_DATABASE_URL
-- testport.txt --
PORT

-- password --
T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ
-- creds --
[email protected]
fj293fbBnlQ!f9vNs

-- config.toml.tmpl --
[Webserver]
HTTPPort = $PORT

[[Cosmos]]
ChainID = '68472'

[[Cosmos.Nodes]]
Name = 'Blue'
TendermintURL = 'wss://primaryfoo.bar'

[[Cosmos.Nodes]]
Name = 'Yellow'
TendermintURL = 'wss://sendonlyfoo.bar'

-- out.txt --

---------------------------------------
Name: Blue
Chain ID: 68472
State:
Config: Name = 'Blue'
TendermintURL = 'wss://primaryfoo.bar'

---------------------------------------
Name: Yellow
Chain ID: 68472
State:
Config: Name = 'Yellow'
TendermintURL = 'wss://sendonlyfoo.bar'

---------------------------------------
57 changes: 57 additions & 0 deletions testdata/scripts/nodes/solana/list/list.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# start node
exec sh -c 'eval "echo \"$(cat config.toml.tmpl)\" > config.toml"'
exec chainlink node -c config.toml start -p password -a creds &

# initialize client
env NODEURL=http://localhost:$PORT
exec curl --retry 10 --retry-max-time 60 --retry-connrefused $NODEURL
exec chainlink --remote-node-url $NODEURL admin login -file creds --bypass-version-check

exec chainlink --remote-node-url $NODEURL nodes solana list
cmp stdout out.txt

-- testdb.txt --
CL_DATABASE_URL
-- testport.txt --
PORT

-- password --
T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ
-- creds --
[email protected]
fj293fbBnlQ!f9vNs

-- config.toml.tmpl --
[Webserver]
HTTPPort = $PORT

[[Solana]]
ChainID = '68472'

[[Solana.Nodes]]
Name = 'Blue'
URL = 'wss://primaryfoo.bar'

[[Solana.Nodes]]
Name = 'Yellow'
URL = 'wss://sendonlyfoo.bar'

-- out.txt --

-----------------------------
Name: Blue
Chain ID: 68472
State:
Config: Name = 'Blue'
URL = 'wss://primaryfoo.bar'
SendOnly = false

-----------------------------
Name: Yellow
Chain ID: 68472
State:
Config: Name = 'Yellow'
URL = 'wss://sendonlyfoo.bar'
SendOnly = false

-----------------------------
55 changes: 55 additions & 0 deletions testdata/scripts/nodes/starknet/list/list.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# start node
exec sh -c 'eval "echo \"$(cat config.toml.tmpl)\" > config.toml"'
exec chainlink node -c config.toml start -p password -a creds &

# initialize client
env NODEURL=http://localhost:$PORT
exec curl --retry 10 --retry-max-time 60 --retry-connrefused $NODEURL
exec chainlink --remote-node-url $NODEURL admin login -file creds --bypass-version-check

exec chainlink --remote-node-url $NODEURL nodes starknet list
cmp stdout out.txt

-- testdb.txt --
CL_DATABASE_URL
-- testport.txt --
PORT

-- password --
T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ
-- creds --
[email protected]
fj293fbBnlQ!f9vNs

-- config.toml.tmpl --
[Webserver]
HTTPPort = $PORT

[[Starknet]]
ChainID = '68472'

[[Starknet.Nodes]]
Name = 'Blue'
URL = 'wss://primaryfoo.bar'

[[Starknet.Nodes]]
Name = 'Yellow'
URL = 'wss://sendonlyfoo.bar'

-- out.txt --

-----------------------------
Name: Blue
Chain ID: 68472
State:
Config: Name = 'Blue'
URL = 'wss://primaryfoo.bar'

-----------------------------
Name: Yellow
Chain ID: 68472
State:
Config: Name = 'Yellow'
URL = 'wss://sendonlyfoo.bar'

-----------------------------
Loading