Added new test cases for s3 gate, delete marker feature #35

Merged
abereziny merged 2 commits from ylukoyan/frostfs-testcases:delete_markers into master 2023-05-12 08:48:29 +00:00
Member
No description provided.
ylukoyan requested review from JuliaKovshova 2023-05-02 12:15:07 +00:00
ylukoyan requested review from anikeev-yadro 2023-05-02 12:15:07 +00:00
ylukoyan requested review from abereziny 2023-05-02 12:15:07 +00:00
ylukoyan requested review from qa-committers 2023-05-02 12:20:07 +00:00
ylukoyan requested review from qa-developers 2023-05-02 12:20:07 +00:00
anikeev-yadro approved these changes 2023-05-02 12:20:23 +00:00
abereziny reviewed 2023-05-02 18:16:38 +00:00
@ -952,0 +962,4 @@
with allure.step("Delete non-existing object"):
delete_obj = s3_gate_object.delete_object_s3(self.s3_client, bucket, obj_key)
# there should be no objects or delete markers in the bucket
assert "DeleteMarkers" not in delete_obj.keys(), "Delete markers not found"
Member

Error message is misleading. We are expecting Delete markers to not exist, so we shouldn't report it as assertion error message.

"Delete markers should not be created" or smthg

Error message is misleading. We are **expecting** Delete markers to not exist, so we shouldn't report it as assertion error message. "Delete markers should not be created" or smthg
abereziny marked this conversation as resolved
@ -952,0 +986,4 @@
version.get("VersionId") for version in versions if version.get("Key") == file_name
}
assert obj_versions, f"Object versions were not found {objects_list}"
assert "DeleteMarkers" not in delete_object.keys(), "Delete markers not found"
Member

why are we not expecting delete markers here? Also same misleading text.

why are we not expecting delete markers here? Also same misleading text.
Author
Member

Nice catch, thanks! Will be fixed

Nice catch, thanks! Will be fixed
abereziny marked this conversation as resolved
@ -952,0 +996,4 @@
assert (
delete_object.keys() == delete_object_2nd_attempt.keys()
), "Delete markers are not the same"
Member

How can we check delete markers here if we are not expecting it at line 989?

How can we check delete markers here if we are not expecting it at line 989?
abereziny marked this conversation as resolved
ylukoyan requested review from anikeev-yadro 2023-05-03 08:01:50 +00:00
abereziny approved these changes 2023-05-03 08:29:28 +00:00
Member

Please squash commits before merge

Please squash commits before merge
anikeev-yadro approved these changes 2023-05-03 08:38:56 +00:00
ylukoyan added 1 commit 2023-05-03 10:00:39 +00:00
JuliaKovshova reviewed 2023-05-04 06:30:52 +00:00
@ -952,0 +955,4 @@
set_bucket_versioning(self.s3_client, bucket, s3_gate_bucket.VersioningStatus.ENABLED)
objects_list = s3_gate_object.list_objects_versions_s3(self.s3_client, bucket)
assert not objects_list, f"Expected empty bucket, got {objects_list}"
Member

please add allure step descriprion befor this assert.

please add allure step descriprion befor this assert.
@ -952,0 +970,4 @@
def test_s3_delete_twice(self, bucket, simple_object_size):
set_bucket_versioning(self.s3_client, bucket, s3_gate_bucket.VersioningStatus.ENABLED)
objects_list = s3_gate_object.list_objects_s3(self.s3_client, bucket)
assert not objects_list, f"Expected empty bucket, got {objects_list}"
Member

please add allure step descriprion befor this assert.

please add allure step descriprion befor this assert.
ylukoyan force-pushed delete_markers from eaa3608d8f to ce3361ce93 2023-05-04 06:54:16 +00:00 Compare
ylukoyan force-pushed delete_markers from ce3361ce93 to cfd567df58 2023-05-04 08:41:50 +00:00 Compare
JuliaKovshova approved these changes 2023-05-04 09:44:56 +00:00
JuliaKovshova requested review from qa-committers 2023-05-11 08:15:11 +00:00
JuliaKovshova requested review from qa-developers 2023-05-11 08:15:11 +00:00
JuliaKovshova approved these changes 2023-05-11 08:15:18 +00:00
anikeev-yadro approved these changes 2023-05-11 12:13:06 +00:00
ylukoyan added 3 commits 2023-05-12 06:47:29 +00:00
ylukoyan requested review from qa-committers 2023-05-12 06:47:49 +00:00
ylukoyan requested review from qa-developers 2023-05-12 06:47:50 +00:00
JuliaKovshova reviewed 2023-05-12 06:54:49 +00:00
@ -952,0 +961,4 @@
obj_key = "fake_object_key"
with allure.step("Delete non-existing object"):
delete_obj = s3_gate_object.delete_object_s3(self.s3_client, bucket, obj_key)
Member

do we have some error like "this key doesn't exist"?
i think we need additional asseert for this.

do we have some error like "this key doesn't exist"? i think we need additional asseert for this.
@ -952,0 +978,4 @@
file_name = self.object_key_from_file_path(file_path)
with allure.step("Put object into one bucket"):
s3_gate_object.put_object_s3(self.s3_client, bucket, file_path)
Member

please add check for this step.

please add check for this step.
abereziny merged commit b13f0ec33d into master 2023-05-12 08:48:29 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/qa-committers
TrueCloudLab/qa-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-testcases#35
No description provided.