Add test case for loss of one node #46

Closed
ylukoyan wants to merge 1 commit from ylukoyan:one_endpoint_loss into master

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()
Review

Need to make sure to return service in case of failed test.

Need to make sure to return service in case of failed test.
with allure.step(f"Waiting status ready for node {current_node}"):
wait_for_node_to_be_ready(current_node)