[#312] Add new policy test

Signed-off-by: Yulia Kovshova <y.kovshova@yadro.com>
This commit is contained in:
Юлия Ковшова 2022-11-14 15:04:15 +03:00 committed by Julia Kovshova
parent a0da15e60b
commit 2b08a932ac
6 changed files with 302 additions and 4 deletions

View file

@ -204,3 +204,13 @@ def _parse_cid(output: str) -> str:
if len(splitted) != 2:
raise ValueError(f"no CID was parsed from command output: \t{first_line}")
return splitted[1]
@allure.step("Search container by name")
def search_container_by_name(wallet: str, name: str, shell: Shell):
list_cids = list_containers(wallet, shell)
for cid in list_cids:
cont_info = get_container(wallet, cid, shell, True)
if cont_info.get("attributes").get("Name", None) == name:
return cid
return None