Skip to content

Commit

Permalink
s3_gate: Fix spelling errors
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg Kulachenko <[email protected]>
  • Loading branch information
vvarg229 committed Jan 9, 2024
1 parent 63bc21e commit a6408bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def pytest_generate_tests(metafunc):
class TestS3GateBucket(TestNeofsS3GateBase):
@pytest.mark.acl
@pytest.mark.sanity
@allure.title("Test S3: Create Bucket with different ACL")
@allure.title("Test S3: Create Bucket with various ACL")
def test_s3_create_bucket_with_ACL(self):

with allure.step("Create bucket with ACL private"):
Expand Down Expand Up @@ -78,7 +78,7 @@ def test_s3_create_bucket_with_grands(self):
acl_grants=bucket_acl, permitted_users="AllUsers", acl="grant-read"
)

with allure.step("Create bucket with --grant-wtite"):
with allure.step("Create bucket with --grant-write"):
bucket_1 = s3_gate_bucket.create_bucket_s3(
self.s3_client,
True,
Expand Down Expand Up @@ -150,11 +150,11 @@ def test_s3_delete_bucket(self, simple_object_size):
s3_gate_object.put_object_s3(self.s3_client, bucket, file_path_2)
check_objects_in_bucket(self.s3_client, bucket, [file_name_1, file_name_2])

with allure.step("Try to delete not empty bucket and get error"):
with allure.step("Try to delete not empty bucket and expect error"):
with pytest.raises(Exception, match=r".*The bucket you tried to delete is not empty.*"):
s3_gate_bucket.delete_bucket_s3(self.s3_client, bucket)

with allure.step("Delete object in bucket"):
with allure.step("Delete all objects in bucket"):
s3_gate_object.delete_object_s3(self.s3_client, bucket, file_name_1)
s3_gate_object.delete_object_s3(self.s3_client, bucket, file_name_2)
check_objects_in_bucket(self.s3_client, bucket, [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_s3_buckets(self, simple_object_size):
objects_list = s3_gate_object.list_objects_s3(self.s3_client, bucket)
assert not objects_list, f"Expected empty bucket, got {objects_list}"

with allure.step("Check buckets are visible with S3 head command"):
with allure.step("Check buckets are visible with S3 API HeadBucket op"):
s3_gate_bucket.head_bucket(self.s3_client, bucket_1)
s3_gate_bucket.head_bucket(self.s3_client, bucket_2)

Expand All @@ -73,7 +73,7 @@ def test_s3_buckets(self, simple_object_size):
file_name in bucket_objects
), f"Expected file {file_name} in objects list {bucket_objects}"

with allure.step("Try to delete not empty bucket and get error"):
with allure.step("Try to delete not empty bucket and expect error"):
with pytest.raises(Exception, match=r".*The bucket you tried to delete is not empty.*"):
s3_gate_bucket.delete_bucket_s3(self.s3_client, bucket_1)

Expand Down Expand Up @@ -157,7 +157,7 @@ def test_s3_sync_dir(self, bucket, simple_object_size):
with allure.step("Check these are the same objects"):
assert set(key_to_path.keys()) == set(
objects
), f"Expected all objects saved. Got {objects}"
), f"Expected exact objects saved. Got {objects}"
for obj_key in objects:
got_object = s3_gate_object.get_object_s3(self.s3_client, bucket, obj_key)
assert get_file_hash(got_object) == get_file_hash(
Expand Down Expand Up @@ -355,7 +355,7 @@ def test_s3_api_object_tagging(self, bucket, simple_object_size):
@allure.title("Test S3: Delete object & delete objects S3 API")
def test_s3_api_delete(self, two_buckets, simple_object_size, complex_object_size):
"""
Check delete_object and delete_objects S3 API operation. From first bucket some objects deleted one by one.
Check DeleteObject and DeleteObjects S3 API operations. From first bucket some objects deleted one by one.
From second bucket some objects deleted all at once.
"""
max_obj_count = 20
Expand Down

0 comments on commit a6408bc

Please sign in to comment.