Skip to content

Commit

Permalink
testdata/scripts/nodes: add tests for cosmos, solana, starknet (#15365)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 authored Nov 21, 2024
1 parent cb20337 commit a883b59
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 0 deletions.
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'

-----------------------------

0 comments on commit a883b59

Please sign in to comment.