forked from TrueCloudLab/frostfs-testlib
Add GenericCli utility
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
4f3814690e
commit
751381cd60
8 changed files with 80 additions and 71 deletions
|
@ -8,7 +8,7 @@ from typing import Optional, Union
|
|||
import requests
|
||||
|
||||
from frostfs_testlib import reporter
|
||||
from frostfs_testlib.cli import FrostfsCli
|
||||
from frostfs_testlib.cli import FrostfsCli, GenericCli
|
||||
from frostfs_testlib.resources.cli import CLI_DEFAULT_TIMEOUT, FROSTFS_CLI_EXEC
|
||||
from frostfs_testlib.resources.common import DEFAULT_WALLET_CONFIG
|
||||
from frostfs_testlib.shell import Shell
|
||||
|
@ -345,8 +345,8 @@ def _parse_cid(output: str) -> str:
|
|||
|
||||
@reporter.step("Search container by name")
|
||||
def search_container_by_name(name: str, node: ClusterNode):
|
||||
node_shell = node.host.get_shell()
|
||||
output = node_shell.exec(f"curl -I HEAD http://127.0.0.1:8084/{name}")
|
||||
curl = GenericCli("curl", node.host)
|
||||
output = curl(f"-I http://127.0.0.1:8084/{name}")
|
||||
pattern = r"X-Container-Id: (\S+)"
|
||||
cid = re.findall(pattern, output.stdout)
|
||||
if cid:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue