From 9068b96d69ea48f7af334fec1b08db95249e6674 Mon Sep 17 00:00:00 2001 From: Andrey Berezin Date: Mon, 19 Feb 2024 16:18:28 +0300 Subject: [PATCH] [#199] Update shards tests Signed-off-by: Andrey Berezin --- .devenv.hosting.yaml | 8 ++++---- .../testsuites/shard/test_control_shard.py | 16 +--------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.devenv.hosting.yaml b/.devenv.hosting.yaml index 3b3bafab..9d060501 100644 --- a/.devenv.hosting.yaml +++ b/.devenv.hosting.yaml @@ -11,7 +11,7 @@ hosts: - name: frostfs-storage_01 attributes: container_name: s01 - config_path: ../frostfs-dev-env/services/storage/.storage.env + config_path: /etc/frostfs/storage/config.yml wallet_path: ../frostfs-dev-env/services/storage/wallet01.json local_wallet_config_path: ./TemporaryDir/empty-password.yml local_wallet_path: ../frostfs-dev-env/services/storage/wallet01.json @@ -25,7 +25,7 @@ hosts: - name: frostfs-storage_02 attributes: container_name: s02 - config_path: ../frostfs-dev-env/services/storage/.storage.env + config_path: /etc/frostfs/storage/config.yml wallet_path: ../frostfs-dev-env/services/storage/wallet02.json local_wallet_config_path: ./TemporaryDir/empty-password.yml local_wallet_path: ../frostfs-dev-env/services/storage/wallet02.json @@ -39,7 +39,7 @@ hosts: - name: frostfs-storage_03 attributes: container_name: s03 - config_path: ../frostfs-dev-env/services/storage/.storage.env + config_path: /etc/frostfs/storage/config.yml wallet_path: ../frostfs-dev-env/services/storage/wallet03.json local_wallet_config_path: ./TemporaryDir/empty-password.yml local_wallet_path: ../frostfs-dev-env/services/storage/wallet03.json @@ -53,7 +53,7 @@ hosts: - name: frostfs-storage_04 attributes: container_name: s04 - config_path: ../frostfs-dev-env/services/storage/.storage.env + config_path: /etc/frostfs/storage/config.yml wallet_path: ../frostfs-dev-env/services/storage/wallet04.json local_wallet_config_path: ./TemporaryDir/empty-password.yml local_wallet_path: ../frostfs-dev-env/services/storage/wallet04.json diff --git a/pytest_tests/testsuites/shard/test_control_shard.py b/pytest_tests/testsuites/shard/test_control_shard.py index 92b37d19..7f2cf4f6 100644 --- a/pytest_tests/testsuites/shard/test_control_shard.py +++ b/pytest_tests/testsuites/shard/test_control_shard.py @@ -75,20 +75,6 @@ class TestControlShard(ClusterTestBase): ) delete_container(wallet=default_wallet, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint) - @staticmethod - def get_shards_from_config(node: StorageNode) -> list[Shard]: - config_file = node.get_shard_config_path() - file_type = pathlib.Path(config_file).suffix - - parser_method = { - ".env": node.get_shards_from_env, - ".yaml": node.get_shards, - ".yml": node.get_shards, - } - - shards = parser_method[file_type]() - return shards - @staticmethod def get_shards_from_cli(node: StorageNode) -> list[Shard]: wallet_path = node.get_remote_wallet_path() @@ -120,7 +106,7 @@ class TestControlShard(ClusterTestBase): @allure.title("All shards are available") def test_control_shard(self, cluster: Cluster): for storage_node in cluster.storage_nodes: - shards_from_config = self.get_shards_from_config(storage_node) + shards_from_config = storage_node.get_shards() shards_from_cli = self.get_shards_from_cli(storage_node) assert set(shards_from_config) == set(shards_from_cli)