Fix wrong assertion of the test: test_buckets_list_ctime#437
Fix wrong assertion of the test: test_buckets_list_ctime#437sumedhak27 wants to merge 1 commit intoceph:masterfrom
test_buckets_list_ctime#437Conversation
TestName: s3tests_boto3.functional.test_s3:test_buckets_list_ctime Problem: The test creates 5 buckets for a user but in an assertion check, it asserts false if any bucket of the user has CreationTime less than a day prior to current time. Due to this reason the test fails if the user has pre-existing buckets older than a day. Solution: Assert only on the CreationTime of buckets that were created with test execution. Signed-off-by: Sumedh A. Kulkarni <sumedh.a.kulkarni@seagate.com>
|
Is there something specific that is blocking this PR being merged? Or did it just slip through the cracks? |
thanks for the reminder, @jheunis-bloomberg. @alimaredia would you be willing to test this? |
|
FYI, I cherry-picked this commit and tested it on our setup where the test is ordinarily failing and it fixes the test: |
@cbodley - Bob has verified the fix. Can we merge this one in? |
| buckets = [] | ||
| for i in range(5): | ||
| client.create_bucket(Bucket=get_new_bucket_name()) | ||
| buckets.append(client.create_bucket(Bucket=get_new_bucket_name())) |
There was a problem hiding this comment.
this creates an array of create_bucket() response objects, not of bucket names. so the loop below filters out all bucket names and doesn't check any ctimes
There was a problem hiding this comment.
I've fixed this and created a new pull request, #565, as it looks like I don't have rights to update this pull request.
|
merged in #565, thanks @sumedhak27 @bobham-bloomberg |
TestName:
s3tests_boto3.functional.test_s3:test_buckets_list_ctime
Problem:
The test creates 5 buckets for a user but in an assertion check,
it asserts false if any bucket of the user has CreationTime less than a day prior to the current time.
Due to this reason, the test fails if the user has pre-existing buckets older than a day.
Solution:
Assert only on the CreationTime of buckets that were created with test execution.