diff --git a/src/frostfs_testlib/s3/interfaces.py b/src/frostfs_testlib/s3/interfaces.py index 8d82f718..2b6be7d5 100644 --- a/src/frostfs_testlib/s3/interfaces.py +++ b/src/frostfs_testlib/s3/interfaces.py @@ -15,6 +15,7 @@ def _make_objs_dict(key_names): class VersioningStatus(HumanReadableEnum): + UNDEFINED = None ENABLED = "Enabled" SUSPENDED = "Suspended" diff --git a/src/frostfs_testlib/steps/s3/s3_helper.py b/src/frostfs_testlib/steps/s3/s3_helper.py index ae271243..4b900ebd 100644 --- a/src/frostfs_testlib/steps/s3/s3_helper.py +++ b/src/frostfs_testlib/steps/s3/s3_helper.py @@ -67,6 +67,9 @@ def try_to_get_objects_and_expect_error( @reporter.step_deco("Set versioning status to '{status}' for bucket '{bucket}'") def set_bucket_versioning(s3_client: S3ClientWrapper, bucket: str, status: VersioningStatus): + if status == VersioningStatus.UNDEFINED: + return + s3_client.get_bucket_versioning_status(bucket) s3_client.put_bucket_versioning(bucket, status=status) bucket_status = s3_client.get_bucket_versioning_status(bucket)