Fix shards watcher CLI usage #194

Merged
abereziny merged 1 commit from abereziny/frostfs-testlib:bugfix-shards-watcher into master 2024-03-18 08:29:10 +00:00
Showing only changes of commit 9c508c4f66 - Show all commits

View file

@ -79,9 +79,7 @@ class ShardsWatcher:
assert self._is_shard_present(shard_id) assert self._is_shard_present(shard_id)
shards_with_new_errors = self.get_shards_with_new_errors() shards_with_new_errors = self.get_shards_with_new_errors()
assert ( assert shard_id in shards_with_new_errors, f"Expected shard {shard_id} to have new errors, but haven't {self.shards_snapshots[-1]}"
shard_id in shards_with_new_errors
), f"Expected shard {shard_id} to have new errors, but haven't {self.shards_snapshots[-1]}"
@wait_for_success(300, 5) @wait_for_success(300, 5)
def await_for_shards_have_no_new_errors(self): def await_for_shards_have_no_new_errors(self):
@ -97,6 +95,8 @@ class ShardsWatcher:
response = shards_cli.list( response = shards_cli.list(
endpoint=self.storage_node.get_control_endpoint(), endpoint=self.storage_node.get_control_endpoint(),
wallet=self.storage_node.get_remote_wallet_path(),
wallet_password=self.storage_node.get_wallet_password(),
json_mode=True, json_mode=True,
) )
@ -109,6 +109,8 @@ class ShardsWatcher:
) )
return shards_cli.set_mode( return shards_cli.set_mode(
endpoint=self.storage_node.get_control_endpoint(), endpoint=self.storage_node.get_control_endpoint(),
wallet=self.storage_node.get_remote_wallet_path(),
wallet_password=self.storage_node.get_wallet_password(),
mode=mode, mode=mode,
id=[shard_id], id=[shard_id],
clear_errors=clear_errors, clear_errors=clear_errors,