mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-23 03:38:41 +00:00
Merge pull request #565 from bobham-bloomberg/FixListBucketsCtimeTest
Fix wrong assertion of the test: `test_buckets_list_ctime`
This commit is contained in:
commit
00b9a2a291
1 changed files with 7 additions and 3 deletions
|
@ -5266,11 +5266,15 @@ def test_buckets_list_ctime():
|
|||
before = datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(days=1)
|
||||
|
||||
client = get_client()
|
||||
buckets = []
|
||||
for i in range(5):
|
||||
client.create_bucket(Bucket=get_new_bucket_name())
|
||||
name = get_new_bucket_name()
|
||||
client.create_bucket(Bucket=name)
|
||||
buckets.append(name)
|
||||
|
||||
response = client.list_buckets()
|
||||
for bucket in response['Buckets']:
|
||||
if bucket['Name'] in buckets:
|
||||
ctime = bucket['CreationDate']
|
||||
assert before <= ctime, '%r > %r' % (before, ctime)
|
||||
|
||||
|
|
Loading…
Reference in a new issue