From 4b3a5f60c432e091d87eeadc802192a6181bdad1 Mon Sep 17 00:00:00 2001 From: anastasia prasolova Date: Sun, 16 Oct 2022 19:29:09 +0300 Subject: [PATCH] Add check to version test S3 Signed-off-by: Yulia Kovshova --- .../testsuites/services/s3_gate/test_s3_versioning.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pytest_tests/testsuites/services/s3_gate/test_s3_versioning.py b/pytest_tests/testsuites/services/s3_gate/test_s3_versioning.py index 0ba3c55e..f50c640f 100644 --- a/pytest_tests/testsuites/services/s3_gate/test_s3_versioning.py +++ b/pytest_tests/testsuites/services/s3_gate/test_s3_versioning.py @@ -47,7 +47,13 @@ class TestS3GateVersioning(TestS3GateBase): for version in object_version if version.get("Key") == file_name ] - assert actual_version == ["null"], f"Expected version is null, got {object_version}" + assert actual_version == [ + "null" + ], f"Expected version is null in list-object-versions, got {object_version}" + object_0 = s3_gate_object.head_object_s3(self.s3_client, bucket, file_name) + assert ( + object_0.get("VersionId") == "null" + ), f"Expected version is null in head-object, got {object_0.get('VersionId')}" set_bucket_versioning(self.s3_client, bucket, s3_gate_bucket.VersioningStatus.ENABLED)