From 4a17bc7b9cf1d7adb59881eda09429275ce3ecb0 Mon Sep 17 00:00:00 2001 From: Yaroslava Lukoyanova Date: Tue, 8 Aug 2023 16:40:00 +0300 Subject: [PATCH] Marked HTTP GW cases with PUT call with separate pytest mark --- pytest_tests/pytest.ini | 1 + .../services/http_gate/test_http_bearer.py | 3 ++- .../services/http_gate/test_http_gate.py | 16 ++++++++++++---- .../services/http_gate/test_http_headers.py | 4 ++-- .../services/http_gate/test_http_streaming.py | 3 ++- .../http_gate/test_http_system_header.py | 1 + 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/pytest_tests/pytest.ini b/pytest_tests/pytest.ini index f0277cc..fa2cad1 100644 --- a/pytest_tests/pytest.ini +++ b/pytest_tests/pytest.ini @@ -16,6 +16,7 @@ markers = grpc_control: tests related to using frostfs-cli control commands grpc_object_lock: gRPC lock tests http_gate: HTTP gate contract + http_put: HTTP gate test cases with PUT call s3_gate: All S3 gate tests s3_gate_base: Base S3 gate tests s3_gate_bucket: Bucket S3 gate tests diff --git a/pytest_tests/testsuites/services/http_gate/test_http_bearer.py b/pytest_tests/testsuites/services/http_gate/test_http_bearer.py index bfa88c6..18b8a12 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_bearer.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_bearer.py @@ -21,9 +21,10 @@ from frostfs_testlib.utils.file_utils import generate_file logger = logging.getLogger("NeoLogger") -@pytest.mark.skip("Temporarly skip for v0.37") @pytest.mark.sanity @pytest.mark.http_gate +@pytest.mark.skip("Skipped due to deprecated PUT via http") +@pytest.mark.http_put class Test_http_bearer(ClusterTestBase): PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 2 FROM * AS X" diff --git a/pytest_tests/testsuites/services/http_gate/test_http_gate.py b/pytest_tests/testsuites/services/http_gate/test_http_gate.py index 6e7653d..57afb05 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_gate.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_gate.py @@ -99,10 +99,21 @@ class TestHttpGate(ClusterTestBase): http_hostname=self.cluster.default_http_hostname, ) + +@allure.link( + "https://github.com/TrueCloudLab/frostfs-http-gw#frostfs-http-gateway", + name="frostfs-http-gateway", +) +@allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#uploading", name="uploading") +@allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#downloading", name="downloading") +@pytest.mark.sanity +@pytest.mark.http_gate +@pytest.mark.http_put +@pytest.mark.skip("Skipped due to deprecated PUT via http") +class TestHttpPut(ClusterTestBase): @allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#uploading", name="uploading") @allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#downloading", name="downloading") @allure.title("Put over HTTP, Get over HTTP") - @pytest.mark.skip("Skipped due to deprecated PUT via http") @pytest.mark.smoke def test_put_http_get_http( self, complex_object_size: ObjectSize, simple_object_size: ObjectSize @@ -207,7 +218,6 @@ class TestHttpGate(ClusterTestBase): http_hostname=self.cluster.default_http_hostname, ) - @pytest.mark.skip("Skipped due to deprecated PUT via http") @allure.title("Test Expiration-Epoch in HTTP header with epoch_gap={epoch_gap}") @pytest.mark.parametrize("epoch_gap", [0, 1]) def test_expiration_epoch_in_http(self, simple_object_size: ObjectSize, epoch_gap: int): @@ -273,7 +283,6 @@ class TestHttpGate(ClusterTestBase): http_hostname=self.cluster.default_http_hostname, ) - @pytest.mark.skip("Skipped due to deprecated PUT via http") @allure.title("Test Zip in HTTP header") def test_zip_in_http(self, complex_object_size: ObjectSize, simple_object_size: ObjectSize): cid = create_container( @@ -315,7 +324,6 @@ class TestHttpGate(ClusterTestBase): assert get_file_hash(f"{dir_path}/file2") == get_file_hash(file_path_large) @pytest.mark.long - @pytest.mark.skip("Skipped due to deprecated PUT via http") @allure.title("Put over HTTP/Curl, Get over HTTP/Curl for large object") def test_put_http_get_http_large_file(self, complex_object_size: ObjectSize): """ diff --git a/pytest_tests/testsuites/services/http_gate/test_http_headers.py b/pytest_tests/testsuites/services/http_gate/test_http_headers.py index 4d10085..4ff7a4a 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_headers.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_headers.py @@ -30,6 +30,8 @@ logger = logging.getLogger("NeoLogger") @pytest.mark.sanity @pytest.mark.http_gate +@pytest.mark.http_put +@pytest.mark.skip("Skipped due to deprecated PUT via http") class Test_http_headers(ClusterTestBase): PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 4 FROM * AS X" obj1_keys = ["Writer", "Chapter1", "Chapter2"] @@ -85,7 +87,6 @@ class Test_http_headers(ClusterTestBase): yield storage_objects - @pytest.mark.skip("Skipped due to deprecated PUT via http") @allure.title("Get object1 by attribute") def test_object1_can_be_get_by_attr( self, storage_objects_with_attributes: list[StorageObjectInfo] @@ -175,7 +176,6 @@ class Test_http_headers(ClusterTestBase): ) @allure.title("[NEGATIVE] Put object and get right after container is deleted") - @pytest.mark.skip("Skipped due to deprecated PUT via http") def test_negative_put_and_get_object3( self, storage_objects_with_attributes: list[StorageObjectInfo] ): diff --git a/pytest_tests/testsuites/services/http_gate/test_http_streaming.py b/pytest_tests/testsuites/services/http_gate/test_http_streaming.py index fdd9477..0718a2d 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_streaming.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_streaming.py @@ -14,6 +14,8 @@ logger = logging.getLogger("NeoLogger") @pytest.mark.sanity @pytest.mark.http_gate +@pytest.mark.http_put +@pytest.mark.skip("Skipped due to deprecated PUT via http") class Test_http_streaming(ClusterTestBase): PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 4 FROM * AS X" @@ -28,7 +30,6 @@ class Test_http_streaming(ClusterTestBase): [pytest.lazy_fixture("complex_object_size")], ids=["complex object size"], ) - @pytest.mark.skip("Skipped due to deprecated PUT via http") def test_object_can_be_put_get_by_streaming(self, object_size: ObjectSize): """ Test that object can be put using gRPC interface and get using HTTP. diff --git a/pytest_tests/testsuites/services/http_gate/test_http_system_header.py b/pytest_tests/testsuites/services/http_gate/test_http_system_header.py index 8f9cc0f..b87f452 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_system_header.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_system_header.py @@ -37,6 +37,7 @@ SYSTEM_EXPIRATION_RFC3339 = "System-Expiration-RFC3339" @pytest.mark.sanity @pytest.mark.http_gate +@pytest.mark.http_put @pytest.mark.skip("Skipped due to deprecated PUT via http") class Test_http_system_header(ClusterTestBase): PLACEMENT_RULE = "REP 2 IN X CBF 1 SELECT 2 FROM * AS X"