Compare commits

..

24 commits

Author SHA1 Message Date
5b1641edde Fix s3_client fixture
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-30 11:23:29 +03:00
10da8ae15e Delete object after put to container
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-22 09:00:57 +00:00
9d5f0d2235 Delete wait replication steps for tests
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
ad7897ea6f Added case for not ignoring unhealthy tree endpoints 2023-06-22 09:00:57 +00:00
0c81ba6f22 Fix test shutdown node
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
737c544fc0 Add case for loss of pilorama on one node 2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
c9bfba136d Add test case for loss of one node 2023-06-22 09:00:57 +00:00
9c3b1c771d Add write-cache loss test
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
2023-06-22 09:00:57 +00:00
61771ed534 Add metabase loss test 2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
07e3ef3972 Fixture for restore stopped storage nodes in test_failover_storage 2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
f84a06a2bb Fixed typo in test_s3_delete_versioning case assertion 2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
378bd0fef8 Add pilorama loss test cases, marked as skipped 2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
319e00c7a7 Add test cases for S3 blobovnicza and fstree loss 2023-06-22 09:00:57 +00:00
0e00a526ca Add wait block for tick epoch and add version testlib
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-22 09:00:57 +00:00
e947ea07cf Test for invalid location constraint
Signed-off-by: Liza <e.chichindaeva@yadro.com>
2023-06-22 09:00:57 +00:00
3fdc14b0a4 [#41] lifetime: Fix lifetime test
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-06-22 09:00:57 +00:00
c1b64e83a9 Fix tests
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
2023-06-22 09:00:57 +00:00
1ba361b636 Move shared code to testlib
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
2023-06-22 09:00:57 +00:00
Yaroslava Lukoyanova
78babed619 Added new test cases for s3 gate, delete marker feature 2023-06-22 09:00:57 +00:00
197320f4eb Node argument made optional for epoch ticks
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-22 09:00:57 +00:00
81a5734e76 Add tests for node shutdown and object replication integrity
Signed-off-by: Dmitriy Zayakin <d.zayakin@yadro.com>
2023-06-22 09:00:57 +00:00
4272bff8c9 Add check for Errors while deleting objects 2023-06-22 09:00:57 +00:00
010757b0a9 Add test for putting object while one node is stopped
Signed-off-by: Liza <e.chichindaeva@yadro.com>
2023-06-22 09:00:57 +00:00
934f76c52f Use proper name for binary
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
2023-05-04 16:32:33 +03:00
13 changed files with 26 additions and 107 deletions

View file

@ -14,8 +14,6 @@ hosts:
endpoint_data0: s01.frostfs.devenv:8080 endpoint_data0: s01.frostfs.devenv:8080
control_endpoint: s01.frostfs.devenv:8081 control_endpoint: s01.frostfs.devenv:8081
un_locode: "RU MOW" un_locode: "RU MOW"
http_hostname: "no_hostname"
s3_hostname: "no_hostname"
- name: s02 - name: s02
attributes: attributes:
container_name: s02 container_name: s02
@ -28,8 +26,6 @@ hosts:
endpoint_data0: s02.frostfs.devenv:8080 endpoint_data0: s02.frostfs.devenv:8080
control_endpoint: s02.frostfs.devenv:8081 control_endpoint: s02.frostfs.devenv:8081
un_locode: "RU LED" un_locode: "RU LED"
http_hostname: "no_hostname"
s3_hostname: "no_hostname"
- name: s03 - name: s03
attributes: attributes:
container_name: s03 container_name: s03
@ -42,8 +38,6 @@ hosts:
endpoint_data0: s03.frostfs.devenv:8080 endpoint_data0: s03.frostfs.devenv:8080
control_endpoint: s03.frostfs.devenv:8081 control_endpoint: s03.frostfs.devenv:8081
un_locode: "SE STO" un_locode: "SE STO"
http_hostname: "no_hostname"
s3_hostname: "no_hostname"
- name: s04 - name: s04
attributes: attributes:
container_name: s04 container_name: s04
@ -56,8 +50,6 @@ hosts:
endpoint_data0: s04.frostfs.devenv:8080 endpoint_data0: s04.frostfs.devenv:8080
control_endpoint: s04.frostfs.devenv:8081 control_endpoint: s04.frostfs.devenv:8081
un_locode: "FI HEL" un_locode: "FI HEL"
http_hostname: "no_hostname"
s3_hostname: "no_hostname"
- name: s3-gate01 - name: s3-gate01
attributes: attributes:
container_name: s3_gate container_name: s3_gate

2
.gitignore vendored
View file

@ -3,7 +3,7 @@
.idea .idea
.DS_Store .DS_Store
venv.*
venv_macos venv_macos

View file

@ -4,39 +4,26 @@ VENV_NAME = frostfs-testcases-${PYTHON_VERSION}
VENV_DIR := venv.${VENV_NAME} VENV_DIR := venv.${VENV_NAME}
current_dir := $(shell pwd) current_dir := $(shell pwd)
FROM_VENV := . ${VENV_DIR}/bin/activate &&
venv: create requirements paths precommit venv: create requirements paths precommit
@echo Ready @echo Ready
precommit: precommit:
@echo Isntalling pre-commit hooks @echo Isntalling pre-commit hooks
${FROM_VENV} pre-commit install . ${VENV_DIR}/bin/activate && pre-commit install
paths: paths:
@echo Append paths for project @echo Append paths for project
@echo Virtual environment: ${VENV_DIR} @echo Virtual environment: ${VENV_DIR}
@rm -rf ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth @sudo rm -rf ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth
@touch ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth @sudo touch ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth
@echo ${current_dir} | tee ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth @echo ${current_dir} | sudo tee ${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/_paths.pth
create: ${VENV_DIR} create:
@echo Create virtual environment for
${VENV_DIR}: virtualenv --python=python${PYTHON_VERSION} --prompt=${VENV_NAME} ${VENV_DIR}
@echo Create virtual environment ${VENV_DIR}
virtualenv --python=python${PYTHON_VERSION} --prompt=frostfs-testlib ${VENV_DIR}
requirements: requirements:
@echo Isntalling pip requirements @echo Isntalling pip requirements
${FROM_VENV} pip install -e ../frostfs-testlib . ${VENV_DIR}/bin/activate && pip install -e ../frostfs-testlib
${FROM_VENV} pip install -Ur requirements.txt . ${VENV_DIR}/bin/activate && pip install -Ur pytest_tests/requirements.txt
${FROM_VENV} pip install -Ur requirements_dev.txt
#### VALIDATION SECTION ####
lint: create requirements
${FROM_VENV} pip install -e ../frostfs-testlib;
${FROM_VENV} pylint --disable R,C,W pytest_tests
validation: lint
${FROM_VENV} pytest --collect-only

View file

@ -165,6 +165,7 @@ def s3_client(
cluster: Cluster, cluster: Cluster,
request: pytest.FixtureRequest, request: pytest.FixtureRequest,
) -> S3ClientWrapper: ) -> S3ClientWrapper:
s3_bearer_rules_file = f"{os.getcwd()}/pytest_tests/resources/files/s3_bearer_rules.json"
wallet = WalletInfo(path=default_wallet, password=DEFAULT_WALLET_PASS) wallet = WalletInfo(path=default_wallet, password=DEFAULT_WALLET_PASS)
(cid, access_key_id, secret_access_key) = s3_helper.init_s3_credentials( (cid, access_key_id, secret_access_key) = s3_helper.init_s3_credentials(
@ -172,6 +173,7 @@ def s3_client(
client_shell, client_shell,
cluster, cluster,
s3gates=[cluster_node.s3_gate for cluster_node in cluster.cluster_nodes], s3gates=[cluster_node.s3_gate for cluster_node in cluster.cluster_nodes],
s3_bearer_rules_file=s3_bearer_rules_file,
policy=s3_policy, policy=s3_policy,
) )
containers_list = list_containers( containers_list = list_containers(

View file

@ -28,11 +28,11 @@ blocked_nodes: list[StorageNode] = []
@pytest.mark.failover_network @pytest.mark.failover_network
class TestFailoverNetwork(ClusterTestBase): class TestFailoverNetwork(ClusterTestBase):
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
@allure.title("Restore network") @allure.step("Restore network")
def restore_network(self): def restore_network(self):
yield yield
with allure.step(f"Count blocked nodes {len(blocked_nodes)}"):
not_empty = len(blocked_nodes) != 0 not_empty = len(blocked_nodes) != 0
for node in list(blocked_nodes): for node in list(blocked_nodes):
with allure.step(f"Restore network at host for {node.label}"): with allure.step(f"Restore network at host for {node.label}"):
IpTablesHelper.restore_input_traffic_to_port(node.host.get_shell(), PORTS_TO_BLOCK) IpTablesHelper.restore_input_traffic_to_port(node.host.get_shell(), PORTS_TO_BLOCK)
@ -42,10 +42,7 @@ class TestFailoverNetwork(ClusterTestBase):
@allure.title("Block Storage node traffic") @allure.title("Block Storage node traffic")
def test_block_storage_node_traffic( def test_block_storage_node_traffic(
self, self, default_wallet: str, require_multiple_hosts, simple_object_size: int
default_wallet: str,
require_multiple_hosts,
simple_object_size: int,
): ):
""" """
Block storage nodes traffic using iptables and wait for replication for objects. Block storage nodes traffic using iptables and wait for replication for objects.

View file

@ -20,7 +20,6 @@ from frostfs_testlib.utils.file_utils import generate_file
logger = logging.getLogger("NeoLogger") logger = logging.getLogger("NeoLogger")
@pytest.mark.skip("Temporarly skip for v0.37")
@pytest.mark.sanity @pytest.mark.sanity
@pytest.mark.http_gate @pytest.mark.http_gate
class Test_http_bearer(ClusterTestBase): class Test_http_bearer(ClusterTestBase):
@ -92,7 +91,6 @@ class Test_http_bearer(ClusterTestBase):
error_pattern="access to object operation denied", error_pattern="access to object operation denied",
) )
@pytest.mark.skip("Temp disable for v0.37")
@pytest.mark.parametrize( @pytest.mark.parametrize(
"object_size", "object_size",
[pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")], [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")],

View file

@ -94,13 +94,11 @@ class TestHttpGate(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
@allure.link("https://github.com/TrueCloudLab/frostfs-http-gw#uploading", name="uploading") @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.link("https://github.com/TrueCloudLab/frostfs-http-gw#downloading", name="downloading")
@allure.title("Test Put over HTTP, Get over HTTP") @allure.title("Test Put over HTTP, Get over HTTP")
@pytest.mark.skip("Skipped due to deprecated PUT via http")
@pytest.mark.smoke @pytest.mark.smoke
def test_put_http_get_http(self, complex_object_size: int, simple_object_size: int): def test_put_http_get_http(self, complex_object_size: int, simple_object_size: int):
""" """
@ -143,14 +141,12 @@ class TestHttpGate(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
hostname=self.cluster.default_http_hostname,
) )
@allure.link( @allure.link(
"https://github.com/TrueCloudLab/frostfs-http-gw#by-attributes", "https://github.com/TrueCloudLab/frostfs-http-gw#by-attributes",
name="download by attributes", name="download by attributes",
) )
@pytest.mark.skip("Skipped due to deprecated PUT via http")
@allure.title("Test Put over HTTP, Get over HTTP with headers") @allure.title("Test Put over HTTP, Get over HTTP with headers")
@pytest.mark.parametrize( @pytest.mark.parametrize(
"attributes", "attributes",
@ -198,10 +194,8 @@ class TestHttpGate(ClusterTestBase):
cid=cid, cid=cid,
attrs=attributes, attrs=attributes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
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") @allure.title("Test Expiration-Epoch in HTTP header")
@pytest.mark.parametrize("epoch_gap", [0, 1]) @pytest.mark.parametrize("epoch_gap", [0, 1])
def test_expiration_epoch_in_http(self, simple_object_size: int, epoch_gap): def test_expiration_epoch_in_http(self, simple_object_size: int, epoch_gap):
@ -226,23 +220,14 @@ class TestHttpGate(ClusterTestBase):
with allure.step("Put objects using HTTP with attribute Expiration-Epoch"): with allure.step("Put objects using HTTP with attribute Expiration-Epoch"):
oid = upload_via_http_gate( oid = upload_via_http_gate(
cid=cid, cid=cid, path=file_path, headers=headers, endpoint=http_endpoint
path=file_path,
headers=headers,
endpoint=http_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
if get_epoch(self.shell, self.cluster) + 1 <= valid_until: if get_epoch(self.shell, self.cluster) + 1 <= valid_until:
oids_to_be_valid.append(oid) oids_to_be_valid.append(oid)
else: else:
oids_to_be_expired.append(oid) oids_to_be_expired.append(oid)
with allure.step("This object can be got"): with allure.step("This object can be got"):
get_via_http_gate( get_via_http_gate(cid=cid, oid=oid, endpoint=http_endpoint)
cid=cid,
oid=oid,
endpoint=http_endpoint,
http_hostname=self.cluster.default_http_hostname,
)
self.tick_epoch() self.tick_epoch()
@ -256,18 +241,11 @@ class TestHttpGate(ClusterTestBase):
oid=oid, oid=oid,
error_pattern=OBJECT_NOT_FOUND_ERROR, error_pattern=OBJECT_NOT_FOUND_ERROR,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
for oid in oids_to_be_valid: for oid in oids_to_be_valid:
with allure.step(f"{oid} shall be valid and can be got"): with allure.step(f"{oid} shall be valid and can be got"):
get_via_http_gate( get_via_http_gate(cid=cid, oid=oid, endpoint=http_endpoint)
cid=cid,
oid=oid,
endpoint=http_endpoint,
http_hostname=self.cluster.default_http_hostname,
)
@pytest.mark.skip("Skipped due to deprecated PUT via http")
@allure.title("Test Zip in HTTP header") @allure.title("Test Zip in HTTP header")
def test_zip_in_http(self, complex_object_size: int, simple_object_size: int): def test_zip_in_http(self, complex_object_size: int, simple_object_size: int):
cid = create_container( cid = create_container(
@ -299,10 +277,7 @@ class TestHttpGate(ClusterTestBase):
) )
dir_path = get_via_zip_http_gate( dir_path = get_via_zip_http_gate(
cid=cid, cid=cid, prefix=common_prefix, endpoint=self.cluster.default_http_gate_endpoint
prefix=common_prefix,
endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
with allure.step("Verify hashes"): with allure.step("Verify hashes"):
@ -310,7 +285,6 @@ class TestHttpGate(ClusterTestBase):
assert get_file_hash(f"{dir_path}/file2") == get_file_hash(file_path_large) assert get_file_hash(f"{dir_path}/file2") == get_file_hash(file_path_large)
@pytest.mark.long @pytest.mark.long
@pytest.mark.skip("Skipped due to deprecated PUT via http")
@allure.title("Test Put over HTTP/Curl, Get over HTTP/Curl for large object") @allure.title("Test Put over HTTP/Curl, Get over HTTP/Curl for large object")
def test_put_http_get_http_large_file(self, complex_object_size: int): def test_put_http_get_http_large_file(self, complex_object_size: int):
""" """
@ -346,7 +320,6 @@ class TestHttpGate(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
hostname=self.cluster.default_http_hostname,
) )
verify_object_hash( verify_object_hash(
oid=oid_curl, oid=oid_curl,
@ -356,11 +329,9 @@ class TestHttpGate(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
object_getter=get_via_http_curl, object_getter=get_via_http_curl,
) )
@pytest.mark.skip("Skipped due to deprecated PUT via http")
@allure.title("Test Put/Get over HTTP using Curl utility") @allure.title("Test Put/Get over HTTP using Curl utility")
def test_put_http_get_http_curl(self, complex_object_size: int, simple_object_size: int): def test_put_http_get_http_curl(self, complex_object_size: int, simple_object_size: int):
""" """
@ -396,6 +367,5 @@ class TestHttpGate(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
object_getter=get_via_http_curl, object_getter=get_via_http_curl,
) )

View file

@ -47,12 +47,9 @@ class Test_http_headers(ClusterTestBase):
@pytest.fixture( @pytest.fixture(
params=[ params=[
pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("simple_object_size"),
# TODO: Temp disable for v0.37 pytest.lazy_fixture("complex_object_size"),
# pytest.lazy_fixture("complex_object_size"),
], ],
# TODO: Temp disable for v0.37 ids=["simple object", "complex object"],
# ids=["simple object", "complex object"],
ids=["simple object"],
scope="class", scope="class",
) )
def storage_objects_with_attributes(self, request: FixtureRequest) -> list[StorageObjectInfo]: def storage_objects_with_attributes(self, request: FixtureRequest) -> list[StorageObjectInfo]:
@ -105,7 +102,6 @@ class Test_http_headers(ClusterTestBase):
cid=storage_object_1.cid, cid=storage_object_1.cid,
attrs={"Chapter2": storage_object_1.attributes["Chapter2"]}, attrs={"Chapter2": storage_object_1.attributes["Chapter2"]},
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
@allure.title("Test get object2 with different attributes, then delete object2 and get object1") @allure.title("Test get object2 with different attributes, then delete object2 and get object1")
@ -139,7 +135,6 @@ class Test_http_headers(ClusterTestBase):
cid=storage_object_2.cid, cid=storage_object_2.cid,
attrs=attributes, attrs=attributes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
with allure.step("Delete object#2 and verify is the container deleted"): with allure.step("Delete object#2 and verify is the container deleted"):
delete_object( delete_object(
@ -154,7 +149,6 @@ class Test_http_headers(ClusterTestBase):
oid=storage_object_2.oid, oid=storage_object_2.oid,
error_pattern=OBJECT_ALREADY_REMOVED_ERROR, error_pattern=OBJECT_ALREADY_REMOVED_ERROR,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
storage_objects_with_attributes.remove(storage_object_2) storage_objects_with_attributes.remove(storage_object_2)
@ -168,11 +162,9 @@ class Test_http_headers(ClusterTestBase):
cid=storage_object_1.cid, cid=storage_object_1.cid,
attrs=key_value_pair, attrs=key_value_pair,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
@allure.title("[Negative] Try to put object and get right after container is deleted") @allure.title("[Negative] Try to 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( def test_negative_put_and_get_object3(
self, storage_objects_with_attributes: list[StorageObjectInfo] self, storage_objects_with_attributes: list[StorageObjectInfo]
): ):
@ -232,5 +224,4 @@ class Test_http_headers(ClusterTestBase):
attrs=attrs_obj3, attrs=attrs_obj3,
http_request_path=request, http_request_path=request,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )

View file

@ -91,7 +91,6 @@ class Test_http_object(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
with allure.step("[Negative] try to get object: [get/$CID/chapter1/peace]"): with allure.step("[Negative] try to get object: [get/$CID/chapter1/peace]"):
attrs = {obj_key1: obj_value1, obj_key2: obj_value2} attrs = {obj_key1: obj_value1, obj_key2: obj_value2}
@ -104,7 +103,6 @@ class Test_http_object(ClusterTestBase):
http_request_path=request, http_request_path=request,
attrs=attrs, attrs=attrs,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
with allure.step( with allure.step(
@ -116,7 +114,6 @@ class Test_http_object(ClusterTestBase):
cid=cid, cid=cid,
attrs=attrs, attrs=attrs,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
hostname=self.cluster.default_http_hostname,
) )
with allure.step("[Negative] try to get object: get_by_attribute/$CID/$OID"): with allure.step("[Negative] try to get object: get_by_attribute/$CID/$OID"):
request = f"/get_by_attribute/{cid}/{oid}" request = f"/get_by_attribute/{cid}/{oid}"
@ -126,5 +123,4 @@ class Test_http_object(ClusterTestBase):
error_pattern=expected_err_msg, error_pattern=expected_err_msg,
http_request_path=request, http_request_path=request,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
hostname=self.cluster.default_http_hostname,
) )

View file

@ -27,7 +27,6 @@ class Test_http_streaming(ClusterTestBase):
[pytest.lazy_fixture("complex_object_size")], [pytest.lazy_fixture("complex_object_size")],
ids=["complex object"], ids=["complex object"],
) )
@pytest.mark.skip("Skipped due to deprecated PUT via http")
def test_object_can_be_put_get_by_streaming(self, object_size: int): def test_object_can_be_put_get_by_streaming(self, object_size: int):
""" """
Test that object can be put using gRPC interface and get using HTTP. Test that object can be put using gRPC interface and get using HTTP.
@ -67,5 +66,4 @@ class Test_http_streaming(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
hostname=self.cluster.default_http_hostname,
) )

View file

@ -130,7 +130,6 @@ class Test_http_system_header(ClusterTestBase):
shell=self.shell, shell=self.shell,
nodes=self.cluster.storage_nodes, nodes=self.cluster.storage_nodes,
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
hostname=self.cluster.default_http_hostname,
) )
head = head_object( head = head_object(
wallet=self.wallet, wallet=self.wallet,
@ -210,7 +209,6 @@ class Test_http_system_header(ClusterTestBase):
[pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")], [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")],
ids=["simple object", "complex object"], ids=["simple object", "complex object"],
) )
@pytest.mark.skip("Temp disable for v0.37")
def test_http_attr_priority_epoch_duration( def test_http_attr_priority_epoch_duration(
self, user_container: str, object_size: int, epoch_duration: int self, user_container: str, object_size: int, epoch_duration: int
): ):
@ -243,7 +241,6 @@ class Test_http_system_header(ClusterTestBase):
oid=oid, oid=oid,
error_pattern="404 Not Found", error_pattern="404 Not Found",
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
# check that object is not available via grpc # check that object is not available via grpc
with pytest.raises(Exception, match=OBJECT_NOT_FOUND): with pytest.raises(Exception, match=OBJECT_NOT_FOUND):
@ -259,7 +256,6 @@ class Test_http_system_header(ClusterTestBase):
[pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")], [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")],
ids=["simple object", "complex object"], ids=["simple object", "complex object"],
) )
@pytest.mark.skip("Temp disable for v0.37")
def test_http_attr_priority_dur_timestamp( def test_http_attr_priority_dur_timestamp(
self, user_container: str, object_size: int, epoch_duration: int self, user_container: str, object_size: int, epoch_duration: int
): ):
@ -299,7 +295,6 @@ class Test_http_system_header(ClusterTestBase):
oid=oid, oid=oid,
error_pattern="404 Not Found", error_pattern="404 Not Found",
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
# check that object is not available via grpc # check that object is not available via grpc
with pytest.raises(Exception, match=OBJECT_NOT_FOUND): with pytest.raises(Exception, match=OBJECT_NOT_FOUND):
@ -315,7 +310,6 @@ class Test_http_system_header(ClusterTestBase):
[pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")], [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")],
ids=["simple object", "complex object"], ids=["simple object", "complex object"],
) )
@pytest.mark.skip("Temp disable for v0.37")
def test_http_attr_priority_timestamp_rfc( def test_http_attr_priority_timestamp_rfc(
self, user_container: str, object_size: int, epoch_duration: int self, user_container: str, object_size: int, epoch_duration: int
): ):
@ -355,7 +349,6 @@ class Test_http_system_header(ClusterTestBase):
oid=oid, oid=oid,
error_pattern="404 Not Found", error_pattern="404 Not Found",
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
# check that object is not available via grpc # check that object is not available via grpc
with pytest.raises(Exception, match=OBJECT_NOT_FOUND): with pytest.raises(Exception, match=OBJECT_NOT_FOUND):
@ -366,11 +359,8 @@ class Test_http_system_header(ClusterTestBase):
@allure.title("Test that object is automatically delete when expiration passed") @allure.title("Test that object is automatically delete when expiration passed")
@pytest.mark.parametrize( @pytest.mark.parametrize(
"object_size", "object_size",
# TODO: Temp disabled for v0.37 [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")],
# [pytest.lazy_fixture("simple_object_size"), pytest.lazy_fixture("complex_object_size")], ids=["simple object", "complex object"],
[pytest.lazy_fixture("simple_object_size")],
# ids=["simple object", "complex object"],
ids=["simple object"],
) )
def test_http_rfc_object_unavailable_after_expir( def test_http_rfc_object_unavailable_after_expir(
self, user_container: str, object_size: int, epoch_duration: int self, user_container: str, object_size: int, epoch_duration: int
@ -411,7 +401,6 @@ class Test_http_system_header(ClusterTestBase):
oid=oid, oid=oid,
error_pattern="404 Not Found", error_pattern="404 Not Found",
endpoint=self.cluster.default_http_gate_endpoint, endpoint=self.cluster.default_http_gate_endpoint,
http_hostname=self.cluster.default_http_hostname,
) )
# check that object is not available via grpc # check that object is not available via grpc
with pytest.raises(Exception, match=OBJECT_NOT_FOUND): with pytest.raises(Exception, match=OBJECT_NOT_FOUND):

View file

@ -18,7 +18,7 @@ class TestLogs(ClusterTestBase):
end_time = datetime.utcnow() end_time = datetime.utcnow()
logs_dir = os.path.join(temp_directory, "logs") logs_dir = os.path.join(temp_directory, "logs")
os.makedirs(logs_dir) os.makedirs(logs_dir)
issues_regex = r"\Wpanic\W|\Woom\W|\Wtoo many\W|\Winsufficient funds\W" issues_regex = r"\Wpanic\W|\Woom\W|\Wtoo many open files\W"
hosts_with_problems = [] hosts_with_problems = []
for host in self.cluster.hosts: for host in self.cluster.hosts:

View file

@ -1,3 +1,2 @@
pre-commit==2.20.0 pre-commit==2.20.0
isort==5.12.0 isort==5.12.0
pylint==2.17.4