[#161] Improve logging

Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
Andrey Berezin 2023-11-29 16:34:59 +03:00
parent 3b071f02f7
commit 873d6e3d14
40 changed files with 980 additions and 950 deletions

View file

@ -1,6 +1,6 @@
from typing import Optional
import allure
from frostfs_testlib import reporter
from frostfs_testlib.resources.cli import CLI_DEFAULT_TIMEOUT
from frostfs_testlib.resources.error_patterns import OBJECT_ACCESS_DENIED
from frostfs_testlib.shell import Shell
@ -31,7 +31,7 @@ def can_get_object(
wallet_config: Optional[str] = None,
xhdr: Optional[dict] = None,
) -> bool:
with allure.step("Try get object from container"):
with reporter.step("Try get object from container"):
try:
got_file_path = get_object_from_random_node(
wallet,
@ -63,7 +63,7 @@ def can_put_object(
xhdr: Optional[dict] = None,
attributes: Optional[dict] = None,
) -> bool:
with allure.step("Try put object to container"):
with reporter.step("Try put object to container"):
try:
put_object_to_random_node(
wallet,
@ -94,7 +94,7 @@ def can_delete_object(
wallet_config: Optional[str] = None,
xhdr: Optional[dict] = None,
) -> bool:
with allure.step("Try delete object from container"):
with reporter.step("Try delete object from container"):
try:
delete_object(
wallet,
@ -125,7 +125,7 @@ def can_get_head_object(
xhdr: Optional[dict] = None,
timeout: Optional[str] = CLI_DEFAULT_TIMEOUT,
) -> bool:
with allure.step("Try get head of object"):
with reporter.step("Try get head of object"):
try:
head_object(
wallet,
@ -157,7 +157,7 @@ def can_get_range_of_object(
xhdr: Optional[dict] = None,
timeout: Optional[str] = CLI_DEFAULT_TIMEOUT,
) -> bool:
with allure.step("Try get range of object"):
with reporter.step("Try get range of object"):
try:
get_range(
wallet,
@ -190,7 +190,7 @@ def can_get_range_hash_of_object(
xhdr: Optional[dict] = None,
timeout: Optional[str] = CLI_DEFAULT_TIMEOUT,
) -> bool:
with allure.step("Try get range hash of object"):
with reporter.step("Try get range hash of object"):
try:
get_range_hash(
wallet,
@ -223,7 +223,7 @@ def can_search_object(
xhdr: Optional[dict] = None,
timeout: Optional[str] = CLI_DEFAULT_TIMEOUT,
) -> bool:
with allure.step("Try search object in container"):
with reporter.step("Try search object in container"):
try:
oids = search_object(
wallet,