forked from TrueCloudLab/frostfs-testlib
Add repr and str for most classes used in parametrize
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
38742badf2
commit
2240be09d2
14 changed files with 187 additions and 48 deletions
|
@ -24,6 +24,8 @@ LONG_TIMEOUT = 240
|
|||
|
||||
|
||||
class AwsCliClient(S3ClientWrapper):
|
||||
__repr_name__: str = "AWS CLI"
|
||||
|
||||
# Flags that we use for all S3 commands: disable SSL verification (as we use self-signed
|
||||
# certificate in devenv) and disable automatic pagination in CLI output
|
||||
common_flags = "--no-verify-ssl --no-paginate"
|
||||
|
|
|
@ -44,6 +44,8 @@ def report_error(func):
|
|||
|
||||
|
||||
class Boto3ClientWrapper(S3ClientWrapper):
|
||||
__repr_name__: str = "Boto3 client"
|
||||
|
||||
@reporter.step_deco("Configure S3 client (boto3)")
|
||||
@report_error
|
||||
def __init__(self, access_key_id: str, secret_access_key: str, s3gate_endpoint: str) -> None:
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from abc import abstractmethod
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from typing import Literal, Optional, Union
|
||||
|
||||
from frostfs_testlib.testing.readable import HumanReadableABC
|
||||
|
||||
|
||||
def _make_objs_dict(key_names):
|
||||
objs_list = []
|
||||
|
@ -29,7 +31,7 @@ ACL_COPY = [
|
|||
]
|
||||
|
||||
|
||||
class S3ClientWrapper(ABC):
|
||||
class S3ClientWrapper(HumanReadableABC):
|
||||
@abstractmethod
|
||||
def __init__(self, access_key_id: str, secret_access_key: str, s3gate_endpoint: str) -> None:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue