From 5be478e577081646df48321b0ea54e1f9c662bc5 Mon Sep 17 00:00:00 2001 From: Liza Date: Tue, 2 May 2023 17:41:02 +0300 Subject: [PATCH] Test for invalid location constraint Signed-off-by: Liza --- pytest_tests/resources/files/policy.json | 2 +- pytest_tests/testsuites/services/s3_gate/test_s3_policy.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pytest_tests/resources/files/policy.json b/pytest_tests/resources/files/policy.json index 11a69839..b3bd08e5 100644 --- a/pytest_tests/resources/files/policy.json +++ b/pytest_tests/resources/files/policy.json @@ -1,4 +1,4 @@ { "rep-3": "REP 3", "complex": "REP 1 IN X CBF 1 SELECT 1 FROM * AS X" -} \ No newline at end of file +} diff --git a/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py b/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py index d0a245af..366d7023 100644 --- a/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py +++ b/pytest_tests/testsuites/services/s3_gate/test_s3_policy.py @@ -90,6 +90,12 @@ class TestS3GatePolicy(ClusterTestBase): ) assert copies_2 == 3 + @allure.title("Test S3: bucket with unexisting location constraint") + def test_s3_bucket_wrong_location(self, s3_client: S3ClientWrapper): + with allure.step("Create bucket with unenxisting location constraint policy"): + with pytest.raises(Exception): + s3_client.create_bucket(location_constraint="UNEXISTING LOCATION CONSTRAINT") + @allure.title("Test S3: bucket policy ") def test_s3_bucket_policy(self, s3_client: S3ClientWrapper): with allure.step("Create bucket with default policy"):