From c969d9e482df94997fb69fb295b6949e77cfd974 Mon Sep 17 00:00:00 2001 From: Yaroslava Lukoyanova Date: Tue, 9 Jul 2024 09:49:51 +0300 Subject: [PATCH] [#269] Fix failover cases with outdated LC, used newer LC --- pytest_tests/resources/files/policy.json | 1 + pytest_tests/testsuites/failovers/test_failover_storage.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pytest_tests/resources/files/policy.json b/pytest_tests/resources/files/policy.json index b3bd08e5..e73996a1 100644 --- a/pytest_tests/resources/files/policy.json +++ b/pytest_tests/resources/files/policy.json @@ -1,4 +1,5 @@ { "rep-3": "REP 3", + "rep-1": "REP 1", "complex": "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" } diff --git a/pytest_tests/testsuites/failovers/test_failover_storage.py b/pytest_tests/testsuites/failovers/test_failover_storage.py index 8eddfe17..8358b11d 100644 --- a/pytest_tests/testsuites/failovers/test_failover_storage.py +++ b/pytest_tests/testsuites/failovers/test_failover_storage.py @@ -109,6 +109,7 @@ class TestFailoverStorage(ClusterTestBase): ) assert get_file_hash(source_file_path) == get_file_hash(got_file_path) + @pytest.mark.parametrize("s3_policy", ["pytest_tests/resources/files/policy.json"], indirect=True) @allure.title("Do not ignore unhealthy tree endpoints (s3_client={s3_client})") def test_unhealthy_tree( self, @@ -133,7 +134,7 @@ class TestFailoverStorage(ClusterTestBase): with reporter.step("Create bucket with REP 1 SELECT 1 policy"): bucket = s3_client.create_bucket( - location_constraint="load-1-1", + location_constraint="rep-1", ) file_path = generate_file(simple_object_size.value) @@ -609,6 +610,7 @@ class TestStorageDataLoss(ClusterTestBase): put_object = s3_client.put_object(bucket, file_path) s3_helper.check_objects_in_bucket(s3_client, bucket, expected_objects=[file_name]) + @pytest.mark.parametrize("s3_policy", ["pytest_tests/resources/files/policy.json"], indirect=True) @allure.title("After Pilorama.db loss on one node object is retrievable (s3_client={s3_client})") def test_s3_one_pilorama_loss( self, @@ -617,7 +619,7 @@ class TestStorageDataLoss(ClusterTestBase): cluster_state_controller: ClusterStateController, ): bucket = s3_client.create_bucket( - location_constraint="load-1-4", + location_constraint="rep3", grant_read="uri=http://acs.amazonaws.com/groups/global/AllUsers", ) s3_helper.set_bucket_versioning(s3_client, bucket, VersioningStatus.ENABLED)