change hostname

Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
This commit is contained in:
Dmitriy Zayakin 2023-08-24 08:30:31 +03:00
parent da31a82126
commit ee110e5baf
7 changed files with 34 additions and 35 deletions

View file

@ -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

View file

@ -4,7 +4,6 @@ import random
import re
import time
from time import sleep
from typing import List, Tuple
import allure
import pytest

View file

@ -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,
)

View file

@ -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],
)

View file

@ -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],
)

View file

@ -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],
)

View file

@ -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):