Compare commits

...

2 Commits

Author SHA1 Message Date
Mikhail Kadilov 11dd0140f1 [#201] Execute command object head --raw and check object deletion
Execute command object head --raw and check object deletion

Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com
2024-02-28 01:19:24 +03:00
Mikhail Kadilov f01b886a7e [#201] Execute command object head --raw and check object deletion
Execute command object head --raw and check object deletion

Signed-off-by: Mikhail Kadilov m.kadilov@yadro.com
2024-02-27 23:56:00 +03:00
1 changed files with 13 additions and 2 deletions

View File

@ -222,8 +222,19 @@ class TestObjectApi(ClusterTestBase):
delete_object(wallet, cid, oid, shell, self.cluster.default_rpc_endpoint)
with reporter.step("Execute command object head --raw"):
result = head_object(wallet, cid, oid, shell, self.cluster.default_rpc_endpoint, is_raw=True)
assert result.return_code != 0
try:
result = head_object(wallet, cid, oid, shell, self.cluster.default_rpc_endpoint, is_raw=True)
if result.return_code != 0:
print("Expected error occurred while executing head_object, continuing test execution.")
else:
raise AssertionError("Unexpected successful execution of head_object.")
except Exception as e:
if "object already removed" in str(e):
print("Expected error occurred: object already removed")
else:
print(f"An unexpected error occurred: {e}")
raise
@allure.title("Search objects by native API (obj_size={object_size})")
def test_search_object_api(self, storage_objects: list[StorageObjectInfo]):