Update fixtures to be properly reflected in the allure report
This commit is contained in:
parent
ee110e5baf
commit
841d6674f6
2 changed files with 13 additions and 9 deletions
|
@ -187,15 +187,19 @@ def s3_client(
|
|||
yield client
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def versioning_status(request: pytest.FixtureRequest) -> VersioningStatus:
|
||||
if "param" in request.__dict__:
|
||||
return request.param
|
||||
|
||||
return VersioningStatus.UNDEFINED
|
||||
|
||||
|
||||
@allure.step("Create/delete bucket")
|
||||
@pytest.fixture
|
||||
def bucket(s3_client: S3ClientWrapper, request: pytest.FixtureRequest):
|
||||
def bucket(s3_client: S3ClientWrapper, versioning_status: VersioningStatus):
|
||||
bucket_name = s3_client.create_bucket()
|
||||
|
||||
versioning_status: Optional[VersioningStatus] = None
|
||||
if "param" in request.__dict__:
|
||||
versioning_status = request.param
|
||||
|
||||
if versioning_status:
|
||||
s3_helper.set_bucket_versioning(s3_client, bucket_name, versioning_status)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue