Skip to content

Commit a78af9c

Browse files
authored
tests: fix governed map test by initializing counter after smart-contract operation
1 parent ec14f00 commit a78af9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

e2e-tests/src/blockchain_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def set_governed_map_main_chain_scripts(self, address: str, policy_id: str, wall
584584
@abstractmethod
585585
def get_governed_map(self) -> dict:
586586
"""
587-
Retrieves the governed map from the main chain.
587+
Retrieves the governed map from the partner chain ledger.
588588
589589
Returns:
590590
dict -- Governed map
@@ -594,7 +594,7 @@ def get_governed_map(self) -> dict:
594594
@abstractmethod
595595
def get_governed_map_key(self, key: str) -> str:
596596
"""
597-
Retrieves a specific key from the governed map.
597+
Retrieves a specific key from the governed map from the partner chains ledger.
598598
599599
Arguments:
600600
key {str} -- Key to retrieve

e2e-tests/tests/governed_map/test_observability.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def test_governed_map_initialization(self, observe_governed_map_initialization):
4242
assert observe_governed_map_initialization
4343

4444
def test_map_is_equal_to_main_chain_data(self, api: BlockchainApi, genesis_utxo, wait_until, config: ApiConfig):
45+
smart_contracts_list = api.partner_chains_node.smart_contracts.governed_map.list(genesis_utxo)
4546
current_mc_block = api.get_mc_block()
46-
result = api.partner_chains_node.smart_contracts.governed_map.list(genesis_utxo)
4747
# wait for any changes in the map to become observable, i.e. teardown phase from smart-contracts tests
4848
wait_until(
4949
lambda: api.get_mc_block() > current_mc_block + config.main_chain.security_param,
5050
timeout=config.timeouts.main_chain_tx * config.main_chain.security_param,
5151
)
52-
expected_map = result.json
52+
expected_map = smart_contracts_list.json
5353
actual_map = api.get_governed_map()
5454
actual_map = {key: string_to_hex_bytes(value) for key, value in actual_map.items()}
5555
assert expected_map == actual_map

0 commit comments

Comments
 (0)