Add test case for loss of one node

This commit is contained in:
Yaroslava Lukoyanova 2023-05-24 09:41:30 +03:00
parent 520f9fe5b5
commit 8579ff441b

View file

@ -445,3 +445,22 @@ class TestEmptyMap(ClusterTestBase):
with allure.step("Delete bucket"):
s3_client.delete_bucket(bucket)
@allure.step("Test S3 Loss of one node should trigger use of tree service in another node")
def test_s3_one_endpoint_loss(self, bucket, s3_client: S3ClientWrapper, simple_object_size):
with allure.step("Stop one node and wait for rebalance"):
current_node = self.cluster.storage_nodes[0]
current_node.stop_service()
# waiting for rebalance
sleep(60)
file_path = generate_file(simple_object_size)
file_name = s3_helper.object_key_from_file_path(file_path)
with allure.step("Put object into one bucket"):
put_object = s3_client.put_object(bucket, file_path)
s3_helper.check_objects_in_bucket(s3_client, bucket, expected_objects=[file_name])
with allure.step(f"Start node {current_node}"):
current_node.start_service()
with allure.step(f"Waiting status ready for node {current_node}"):
wait_for_node_to_be_ready(current_node)