Skip to content

Commit

Permalink
Fixed tests sequence x2
Browse files Browse the repository at this point in the history
  • Loading branch information
Arondondon committed Nov 25, 2024
1 parent bb819f0 commit cd89c3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion snet/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def set_session_field(self, key, value, out_f):
self.set_identity_field(session_identity, key, value)
print("set {}={} for identity={}".format(key, value, session_identity), file=out_f)
else:
all_keys = get_session_network_keys() + get_session_identity_keys() + ["default_ipfs_endpoint"]
all_keys = get_session_keys()
raise Exception("key {} not in {}".format(key, all_keys))

def unset_session_field(self, key, out_f):
Expand Down
13 changes: 6 additions & 7 deletions snet/cli/test/functional_tests/func_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,20 @@ class TestAAMainPreparations(BaseTest):
def setUp(self):
super().setUp()

def test_1_set_infura(self):
execute(["set", "default_eth_rpc_endpoint", INFURA], self.parser, self.conf)
result = execute(["session"], self.parser, self.conf)
assert INFURA_KEY in result

def test_2_identity_create(self):
def test_1_identity_create(self):
execute(["identity", "create", IDENTITY, "key", "--private-key", PRIVATE_KEY, "-de"], self.parser, self.conf)
result = execute(["session"], self.parser, self.conf)
assert f"identity: {IDENTITY}" in result

def test_3_set_network(self):
def test_2_set_network(self):
execute(["network", "sepolia"], self.parser, self.conf)
result = execute(["session"], self.parser, self.conf)
assert "network: sepolia" in result

def test_3_set_infura(self):
execute(["set", "default_eth_rpc_endpoint", INFURA], self.parser, self.conf)
result = execute(["session"], self.parser, self.conf)
assert INFURA_KEY in result

class TestCommands(BaseTest):
def test_balance_output(self):
Expand Down

0 comments on commit cd89c3e

Please sign in to comment.