From ee110e5baf0bacc7dcdd8e4f3d2ef5cffab4fbbe Mon Sep 17 00:00:00 2001 From: Dmitriy Zayakin Date: Thu, 24 Aug 2023 08:30:31 +0300 Subject: [PATCH] change hostname Signed-off-by: Dmitriy Zayakin --- .devenv.hosting.yaml | 16 +++++++------- .../failovers/test_failover_network.py | 1 - .../services/http_gate/test_http_gate.py | 22 +++++++++---------- .../services/http_gate/test_http_headers.py | 10 ++++----- .../services/http_gate/test_http_object.py | 8 +++---- .../services/http_gate/test_http_streaming.py | 2 +- .../http_gate/test_http_system_header.py | 10 ++++----- 7 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.devenv.hosting.yaml b/.devenv.hosting.yaml index 936570c..d7bbf9e 100644 --- a/.devenv.hosting.yaml +++ b/.devenv.hosting.yaml @@ -16,8 +16,8 @@ hosts: endpoint_data0: s01.frostfs.devenv:8080 control_endpoint: s01.frostfs.devenv:8081 un_locode: "RU MOW" - http_hostname: "no_hostname" - s3_hostname: "no_hostname" + http_hostname: ["no_hostname"] + s3_hostname: ["no_hostname"] - name: s02 attributes: container_name: s02 @@ -30,8 +30,8 @@ hosts: endpoint_data0: s02.frostfs.devenv:8080 control_endpoint: s02.frostfs.devenv:8081 un_locode: "RU LED" - http_hostname: "no_hostname" - s3_hostname: "no_hostname" + http_hostname: ["no_hostname"] + s3_hostname: ["no_hostname"] - name: s03 attributes: container_name: s03 @@ -44,8 +44,8 @@ hosts: endpoint_data0: s03.frostfs.devenv:8080 control_endpoint: s03.frostfs.devenv:8081 un_locode: "SE STO" - http_hostname: "no_hostname" - s3_hostname: "no_hostname" + http_hostname: ["no_hostname"] + s3_hostname: ["no_hostname"] - name: s04 attributes: container_name: s04 @@ -58,8 +58,8 @@ hosts: endpoint_data0: s04.frostfs.devenv:8080 control_endpoint: s04.frostfs.devenv:8081 un_locode: "FI HEL" - http_hostname: "no_hostname" - s3_hostname: "no_hostname" + http_hostname: ["no_hostname"] + s3_hostname: ["no_hostname"] - name: s3-gate01 attributes: container_name: s3_gate diff --git a/pytest_tests/testsuites/failovers/test_failover_network.py b/pytest_tests/testsuites/failovers/test_failover_network.py index 7ebfcf0..3a89388 100644 --- a/pytest_tests/testsuites/failovers/test_failover_network.py +++ b/pytest_tests/testsuites/failovers/test_failover_network.py @@ -4,7 +4,6 @@ import random import re import time from time import sleep -from typing import List, Tuple import allure import pytest 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 57afb05..cb4c73a 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_gate.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_gate.py @@ -96,7 +96,7 @@ class TestHttpGate(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) @@ -157,7 +157,7 @@ class TestHttpPut(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) @allure.link( @@ -215,7 +215,7 @@ class TestHttpPut(ClusterTestBase): cid=cid, attrs=attributes, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) @allure.title("Test Expiration-Epoch in HTTP header with epoch_gap={epoch_gap}") @@ -246,7 +246,7 @@ class TestHttpPut(ClusterTestBase): path=file_path, headers=headers, endpoint=http_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) if get_epoch(self.shell, self.cluster) + 1 <= valid_until: oids_to_be_valid.append(oid) @@ -257,7 +257,7 @@ class TestHttpPut(ClusterTestBase): cid=cid, oid=oid, endpoint=http_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) self.tick_epoch() @@ -272,7 +272,7 @@ class TestHttpPut(ClusterTestBase): oid=oid, error_pattern=OBJECT_NOT_FOUND_ERROR, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) for oid in oids_to_be_valid: with allure.step(f"{oid} shall be valid and can be got"): @@ -280,7 +280,7 @@ class TestHttpPut(ClusterTestBase): cid=cid, oid=oid, endpoint=http_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) @allure.title("Test Zip in HTTP header") @@ -316,7 +316,7 @@ class TestHttpPut(ClusterTestBase): cid=cid, prefix=common_prefix, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) with allure.step("Verify hashes"): @@ -358,7 +358,7 @@ class TestHttpPut(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) verify_object_hash( oid=oid_curl, @@ -368,7 +368,7 @@ class TestHttpPut(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], object_getter=get_via_http_curl, ) @@ -409,6 +409,6 @@ class TestHttpPut(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], object_getter=get_via_http_curl, ) 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 4ff7a4a..c8703dd 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_headers.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_headers.py @@ -109,7 +109,7 @@ class Test_http_headers(ClusterTestBase): cid=storage_object_1.cid, attrs={"Chapter2": storage_object_1.attributes["Chapter2"]}, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) @allure.title("Get object2 with different attributes, then delete object2 and get object1") @@ -143,7 +143,7 @@ class Test_http_headers(ClusterTestBase): cid=storage_object_2.cid, attrs=attributes, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) with allure.step("Delete object#2 and verify is the container deleted"): delete_object( @@ -158,7 +158,7 @@ class Test_http_headers(ClusterTestBase): oid=storage_object_2.oid, error_pattern=OBJECT_ALREADY_REMOVED_ERROR, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) storage_objects_with_attributes.remove(storage_object_2) @@ -172,7 +172,7 @@ class Test_http_headers(ClusterTestBase): cid=storage_object_1.cid, attrs=key_value_pair, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) @allure.title("[NEGATIVE] Put object and get right after container is deleted") @@ -235,5 +235,5 @@ class Test_http_headers(ClusterTestBase): attrs=attrs_obj3, http_request_path=request, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) diff --git a/pytest_tests/testsuites/services/http_gate/test_http_object.py b/pytest_tests/testsuites/services/http_gate/test_http_object.py index 3088ad4..f5f61fc 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_object.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_object.py @@ -92,7 +92,7 @@ class Test_http_object(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) with allure.step("[Negative] try to get object: [get/$CID/chapter1/peace]"): attrs = {obj_key1: obj_value1, obj_key2: obj_value2} @@ -105,7 +105,7 @@ class Test_http_object(ClusterTestBase): http_request_path=request, attrs=attrs, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) with allure.step( @@ -117,7 +117,7 @@ class Test_http_object(ClusterTestBase): cid=cid, attrs=attrs, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) with allure.step("[Negative] try to get object: get_by_attribute/$CID/$OID"): request = f"/get_by_attribute/{cid}/{oid}" @@ -127,5 +127,5 @@ class Test_http_object(ClusterTestBase): error_pattern=expected_err_msg, http_request_path=request, endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) 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 0718a2d..7cb51bc 100644 --- a/pytest_tests/testsuites/services/http_gate/test_http_streaming.py +++ b/pytest_tests/testsuites/services/http_gate/test_http_streaming.py @@ -69,5 +69,5 @@ class Test_http_streaming(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) 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 b87f452..f2b9b80 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 @@ -133,7 +133,7 @@ class Test_http_system_header(ClusterTestBase): shell=self.shell, nodes=self.cluster.storage_nodes, endpoint=self.cluster.default_http_gate_endpoint, - hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) head = head_object( wallet=self.wallet, @@ -248,7 +248,7 @@ class Test_http_system_header(ClusterTestBase): oid=oid, error_pattern="404 Not Found", endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) # check that object is not available via grpc with pytest.raises(Exception, match=OBJECT_NOT_FOUND): @@ -302,7 +302,7 @@ class Test_http_system_header(ClusterTestBase): oid=oid, error_pattern="404 Not Found", endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) # check that object is not available via grpc with pytest.raises(Exception, match=OBJECT_NOT_FOUND): @@ -356,7 +356,7 @@ class Test_http_system_header(ClusterTestBase): oid=oid, error_pattern="404 Not Found", endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) # check that object is not available via grpc with pytest.raises(Exception, match=OBJECT_NOT_FOUND): @@ -412,7 +412,7 @@ class Test_http_system_header(ClusterTestBase): oid=oid, error_pattern="404 Not Found", endpoint=self.cluster.default_http_gate_endpoint, - http_hostname=self.cluster.default_http_hostname, + http_hostname=self.cluster.default_http_hostname[0], ) # check that object is not available via grpc with pytest.raises(Exception, match=OBJECT_NOT_FOUND):