forked from TrueCloudLab/frostfs-testcases
[#285] Add missing titles to tests
Added titles to the following tests: - `test_static_session_token_container_create` - `test_static_session_token_container_create_with_other_verb` - `test_static_session_token_container_create_with_other_wallet` - `test_static_session_token_container_delete` - `test_put_with_bearer_when_eacl_restrict` - `test_shard_errors` Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
This commit is contained in:
parent
108aae59dd
commit
f1fb95b40c
3 changed files with 10 additions and 9 deletions
|
@ -60,6 +60,7 @@ class Test_http_bearer(ClusterTestBase):
|
|||
error_pattern="access to object operation denied",
|
||||
)
|
||||
|
||||
@allure.title("Put object via HTTP using bearer token (object_size={object_size})")
|
||||
def test_put_with_bearer_when_eacl_restrict(
|
||||
self,
|
||||
object_size: ObjectSize,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import allure
|
||||
import pytest
|
||||
from frostfs_testlib import reporter
|
||||
from frostfs_testlib.shell import Shell
|
||||
|
@ -22,6 +23,7 @@ class TestSessionTokenContainer(ClusterTestBase):
|
|||
"""
|
||||
return {verb: get_container_signed_token(owner_wallet, user_wallet, verb, client_shell, temp_directory) for verb in ContainerVerb}
|
||||
|
||||
@allure.title("Static session with create operation")
|
||||
def test_static_session_token_container_create(
|
||||
self,
|
||||
owner_wallet: WalletInfo,
|
||||
|
@ -46,6 +48,7 @@ class TestSessionTokenContainer(ClusterTestBase):
|
|||
assert cid not in list_containers(user_wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||
assert cid in list_containers(owner_wallet, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||
|
||||
@allure.title("[NEGATIVE] Static session without create operation")
|
||||
def test_static_session_token_container_create_with_other_verb(
|
||||
self,
|
||||
user_wallet: WalletInfo,
|
||||
|
@ -65,6 +68,7 @@ class TestSessionTokenContainer(ClusterTestBase):
|
|||
wait_for_creation=False,
|
||||
)
|
||||
|
||||
@allure.title("[NEGATIVE] Static session with create operation for other wallet")
|
||||
def test_static_session_token_container_create_with_other_wallet(
|
||||
self,
|
||||
stranger_wallet: WalletInfo,
|
||||
|
@ -83,6 +87,7 @@ class TestSessionTokenContainer(ClusterTestBase):
|
|||
wait_for_creation=False,
|
||||
)
|
||||
|
||||
@allure.title("Static session with delete operation")
|
||||
def test_static_session_token_container_delete(
|
||||
self,
|
||||
owner_wallet: WalletInfo,
|
||||
|
|
|
@ -31,9 +31,7 @@ class TestControlShard(ClusterTestBase):
|
|||
data_path = node.storage_node.get_data_directory()
|
||||
all_datas = node_shell.exec(f"ls -la {data_path}/data | awk '{{ print $9 }}'").stdout.strip()
|
||||
for data_dir in all_datas.replace(".", "").strip().split("\n"):
|
||||
check_dir = node_shell.exec(
|
||||
f" [ -d {data_path}/data/{data_dir}/data/{oid_path} ] && echo 1 || echo 0"
|
||||
).stdout
|
||||
check_dir = node_shell.exec(f" [ -d {data_path}/data/{data_dir}/data/{oid_path} ] && echo 1 || echo 0").stdout
|
||||
if "1" in check_dir:
|
||||
object_path = f"{data_path}/data/{data_dir}/data/{oid_path}"
|
||||
object_name = f"{oid[4:]}.{cid}"
|
||||
|
@ -66,9 +64,7 @@ class TestControlShard(ClusterTestBase):
|
|||
basic_acl=EACL_PUBLIC_READ_WRITE,
|
||||
)
|
||||
file = generate_file(round(max_object_size * 0.8))
|
||||
oid = put_object(
|
||||
wallet=default_wallet, path=file, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint
|
||||
)
|
||||
oid = put_object(wallet=default_wallet, path=file, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||
with reporter.step("Search node with object"):
|
||||
nodes = get_object_nodes(cluster=self.cluster, cid=cid, oid=oid, alive_node=self.cluster.cluster_nodes[0])
|
||||
|
||||
|
@ -76,9 +72,7 @@ class TestControlShard(ClusterTestBase):
|
|||
|
||||
object_path, object_name = self.get_object_path_and_name_file(oid, cid, nodes[0])
|
||||
nodes[0].host.get_shell().exec(f"chmod +r {object_path}/{object_name}")
|
||||
delete_object(
|
||||
wallet=default_wallet, cid=cid, oid=oid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint
|
||||
)
|
||||
delete_object(wallet=default_wallet, cid=cid, oid=oid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||
delete_container(wallet=default_wallet, cid=cid, shell=self.shell, endpoint=self.cluster.default_rpc_endpoint)
|
||||
|
||||
@staticmethod
|
||||
|
@ -117,6 +111,7 @@ class TestControlShard(ClusterTestBase):
|
|||
|
||||
assert set(shards_from_config) == set(shards_from_cli)
|
||||
|
||||
@allure.title("Shard become read-only when errors exceeds threshold")
|
||||
@pytest.mark.failover
|
||||
def test_shard_errors(
|
||||
self,
|
||||
|
|
Loading…
Reference in a new issue