forked from TrueCloudLab/frostfs-testcases
[#194] Add except bucket node
This commit is contained in:
parent
e453614381
commit
251a7881c9
1 changed files with 12 additions and 2 deletions
|
@ -20,6 +20,7 @@ from frostfs_testlib.steps.node_management import (
|
||||||
wait_for_node_to_be_ready,
|
wait_for_node_to_be_ready,
|
||||||
)
|
)
|
||||||
from frostfs_testlib.steps.s3 import s3_helper
|
from frostfs_testlib.steps.s3 import s3_helper
|
||||||
|
from frostfs_testlib.steps.s3.s3_helper import search_nodes_with_bucket
|
||||||
from frostfs_testlib.storage.cluster import Cluster, ClusterNode, S3Gate, StorageNode
|
from frostfs_testlib.storage.cluster import Cluster, ClusterNode, S3Gate, StorageNode
|
||||||
from frostfs_testlib.storage.controllers import ClusterStateController, ShardsWatcher
|
from frostfs_testlib.storage.controllers import ClusterStateController, ShardsWatcher
|
||||||
from frostfs_testlib.storage.dataclasses.object_size import ObjectSize
|
from frostfs_testlib.storage.dataclasses.object_size import ObjectSize
|
||||||
|
@ -126,6 +127,7 @@ class TestFailoverStorage(ClusterTestBase):
|
||||||
def test_unhealthy_tree(
|
def test_unhealthy_tree(
|
||||||
self,
|
self,
|
||||||
s3_client: S3ClientWrapper,
|
s3_client: S3ClientWrapper,
|
||||||
|
default_wallet: str,
|
||||||
simple_object_size: ObjectSize,
|
simple_object_size: ObjectSize,
|
||||||
cluster_state_controller: ClusterStateController,
|
cluster_state_controller: ClusterStateController,
|
||||||
after_run_return_all_stopped_services,
|
after_run_return_all_stopped_services,
|
||||||
|
@ -155,8 +157,16 @@ class TestFailoverStorage(ClusterTestBase):
|
||||||
put_object = s3_client.put_object(bucket, file_path)
|
put_object = s3_client.put_object(bucket, file_path)
|
||||||
s3_helper.check_objects_in_bucket(s3_client, bucket, expected_objects=[file_name])
|
s3_helper.check_objects_in_bucket(s3_client, bucket, expected_objects=[file_name])
|
||||||
|
|
||||||
with reporter.step("Turn off all storage nodes except default"):
|
node_bucket = search_nodes_with_bucket(
|
||||||
for node in self.cluster.cluster_nodes[1:]:
|
cluster=self.cluster,
|
||||||
|
bucket_name=bucket,
|
||||||
|
wallet=default_wallet,
|
||||||
|
shell=self.shell,
|
||||||
|
endpoint=self.cluster.storage_nodes[0].get_rpc_endpoint(),
|
||||||
|
)[0]
|
||||||
|
|
||||||
|
with reporter.step("Turn off all storage nodes except bucket node"):
|
||||||
|
for node in [node_to_stop for node_to_stop in self.cluster.cluster_nodes if node_to_stop != node_bucket]:
|
||||||
with reporter.step(f"Stop storage service on node: {node}"):
|
with reporter.step(f"Stop storage service on node: {node}"):
|
||||||
cluster_state_controller.stop_service_of_type(node, StorageNode)
|
cluster_state_controller.stop_service_of_type(node, StorageNode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue