[#310] Extend bucket testsuite #310

Merged
abereziny merged 1 commit from Kiriruso/frostfs-testcases:feature-extend-bucket-testsuite into master 2024-10-31 12:14:45 +00:00
Contributor
  • Added tests to check the correctness of bucket names according to the AWS specification

Signed-off-by: Kirill Sosnovskikh k.sosnovskikh@yadro.com

- Added tests to check the correctness of bucket names according to the AWS specification Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
Kiriruso added 1 commit 2024-10-16 17:49:25 +00:00
[#310] Extend bucket testsuite
Some checks failed
DCO check / Commits Check (pull_request) Has been cancelled
efa7fcf765
- Added tests to check the correctness of bucket names according to the AWS specification

Signed-off-by: Kirill Sosnovskikh <k.sosnovskikh@yadro.com>
Kiriruso force-pushed feature-extend-bucket-testsuite from efa7fcf765 to 66d59d8e3e 2024-10-16 20:45:09 +00:00 Compare
abereziny reviewed 2024-10-17 12:03:28 +00:00
@ -143,0 +192,4 @@
],
)
def test_create_bucket_with_invalid_name(self, s3_client: S3ClientWrapper, prefix: str, postfix: str | None):
bucket_name = prefix if postfix is None else string_utils.unique_name(prefix, postfix)
Member

since it's negative, we don't need unique names here, all the names should be in parameters

since it's negative, we don't need unique names here, all the names should be in parameters
Kiriruso marked this conversation as resolved
abereziny reviewed 2024-10-17 12:04:03 +00:00
@ -143,0 +173,4 @@
with pytest.raises(Exception, match=".*(?:InvalidBucketName|Invalid bucket name).*"):
s3_client.create_bucket(bucket_name)
@allure.title("[NEGATIVE] Create bucket with invalid name (s3_client={s3_client}, prefix={prefix}, postfix={postfix})")
Member

[NEGATIVE] Buckets with invalid names should not be created (blah-blah)

[NEGATIVE] Buckets with invalid names should not be created (blah-blah)
Kiriruso marked this conversation as resolved
abereziny reviewed 2024-10-17 12:05:23 +00:00
@ -143,0 +188,4 @@
["bucket_", "-10"],
["127.10.5.11", None],
["xn--bucket-", "-12"],
["bucket-13-", "-s3alias"],
Member
not all cases from https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html covered
Kiriruso marked this conversation as resolved
abereziny reviewed 2024-10-17 12:06:56 +00:00
@ -143,0 +194,4 @@
def test_create_bucket_with_invalid_name(self, s3_client: S3ClientWrapper, prefix: str, postfix: str | None):
bucket_name = prefix if postfix is None else string_utils.unique_name(prefix, postfix)
with reporter.step("Create bucket with invalid name and catch exception"):
with pytest.raises(Exception, match=".*(?:InvalidBucketName|Invalid bucket name|argument --bucket: expected one argument).*"):
Member

I guess InvalidBucketName and Invalid bucket name comes from boto3 and aws, but why we have argument --bucket: expected one argument here?

I guess `InvalidBucketName` and `Invalid bucket name` comes from boto3 and aws, but why we have `argument --bucket: expected one argument` here?
Kiriruso marked this conversation as resolved
Kiriruso force-pushed feature-extend-bucket-testsuite from 66d59d8e3e to e698af2731 2024-10-21 10:19:26 +00:00 Compare
Kiriruso force-pushed feature-extend-bucket-testsuite from e698af2731 to 52eafc3d70 2024-10-21 10:51:13 +00:00 Compare
abereziny approved these changes 2024-10-21 11:12:48 +00:00
Dismissed
Kiriruso force-pushed feature-extend-bucket-testsuite from 52eafc3d70 to 930176f544 2024-10-25 15:07:17 +00:00 Compare
Kiriruso dismissed abereziny's review 2024-10-25 15:07:18 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

abereziny reviewed 2024-10-25 15:54:51 +00:00
abereziny reviewed 2024-10-25 15:55:14 +00:00
@ -143,0 +216,4 @@
object_path = generate_file(simple_object_size.value)
object_name = s3_helper.object_key_from_file_path(object_path)
with reporter.step("Create bucket"):
Member

Please use bucket fixture

Please use bucket fixture
Kiriruso marked this conversation as resolved
abereziny reviewed 2024-10-25 15:56:56 +00:00
@ -143,0 +206,4 @@
with pytest.raises(Exception, match=".*(?:InvalidBucketName|Invalid bucket name).*"):
s3_client.create_bucket(bucket_name)
@allure.title("Non-empty bucket is available after attempting to delete it (s3_client={s3_client})")
Member

simplier
[NEGATIVE] Delete non-empty bucket (...)

simplier `[NEGATIVE] Delete non-empty bucket (...)`
Kiriruso marked this conversation as resolved
Kiriruso force-pushed feature-extend-bucket-testsuite from 930176f544 to 0d6b54a656 2024-10-25 16:06:55 +00:00 Compare
abereziny approved these changes 2024-10-31 10:21:19 +00:00
d.zayakin approved these changes 2024-10-31 10:28:51 +00:00
i.niyazov approved these changes 2024-10-31 10:29:20 +00:00
abereziny merged commit 0e72717dcd into master 2024-10-31 12:14:45 +00:00
abereziny referenced this pull request from a commit 2024-10-31 12:14:46 +00:00
Sign in to join this conversation.
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#310
No description provided.