From 7a115600000701ac2fdef5d28a31b8824e5c5a66 Mon Sep 17 00:00:00 2001 From: anikeev-yadro Date: Mon, 26 Dec 2022 12:07:56 +0300 Subject: [PATCH] Add await to delete container Signed-off-by: anikeev-yadro --- .../session_token/test_static_session_token_container.py | 2 ++ robot/resources/lib/python_keywords/container.py | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pytest_tests/testsuites/session_token/test_static_session_token_container.py b/pytest_tests/testsuites/session_token/test_static_session_token_container.py index 6dd2f38..46adea8 100644 --- a/pytest_tests/testsuites/session_token/test_static_session_token_container.py +++ b/pytest_tests/testsuites/session_token/test_static_session_token_container.py @@ -25,6 +25,7 @@ from steps.cluster_test_base import ClusterTestBase from steps.session_token import ContainerVerb, get_container_signed_token +@pytest.mark.static_session_container class TestSessionTokenContainer(ClusterTestBase): @pytest.fixture(scope="module") def static_sessions( @@ -136,6 +137,7 @@ class TestSessionTokenContainer(ClusterTestBase): session_token=static_sessions[ContainerVerb.DELETE], shell=self.shell, endpoint=self.cluster.default_rpc_endpoint, + await_mode=True, ) assert cid not in list_containers( diff --git a/robot/resources/lib/python_keywords/container.py b/robot/resources/lib/python_keywords/container.py index 6b3279b..31c239f 100644 --- a/robot/resources/lib/python_keywords/container.py +++ b/robot/resources/lib/python_keywords/container.py @@ -178,6 +178,7 @@ def delete_container( endpoint: str, force: bool = False, session_token: Optional[str] = None, + await_mode: bool = False, ) -> None: """ A wrapper for `neofs-cli container delete` call. @@ -193,7 +194,12 @@ def delete_container( cli = NeofsCli(shell, NEOFS_CLI_EXEC, WALLET_CONFIG) cli.container.delete( - wallet=wallet, cid=cid, rpc_endpoint=endpoint, force=force, session=session_token + wallet=wallet, + cid=cid, + rpc_endpoint=endpoint, + force=force, + session=session_token, + await_mode=await_mode, )