Merge pull request #550 from hmaheswa/ceph-pacific-lc-header-fix

fixing intermittent lifecycle_expiration_header failures(2!=1) beacause of datetime.now() on different timezone
This commit is contained in:
Ali Maredia 2024-02-20 12:16:16 -05:00 committed by GitHub
commit 02257a7409
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9659,7 +9659,7 @@ def test_lifecycle_expiration_header_put():
bucket_name = get_new_bucket() bucket_name = get_new_bucket()
client = get_client() client = get_client()
now = datetime.datetime.now(None) now = datetime.datetime.utcnow()
response = setup_lifecycle_expiration( response = setup_lifecycle_expiration(
client, bucket_name, 'rule1', 1, 'days1/') client, bucket_name, 'rule1', 1, 'days1/')
eq(check_lifecycle_expiration_header(response, now, 'rule1', 1), True) eq(check_lifecycle_expiration_header(response, now, 'rule1', 1), True)
@ -9673,7 +9673,7 @@ def test_lifecycle_expiration_header_head():
bucket_name = get_new_bucket() bucket_name = get_new_bucket()
client = get_client() client = get_client()
now = datetime.datetime.now(None) now = datetime.datetime.utcnow()
response = setup_lifecycle_expiration( response = setup_lifecycle_expiration(
client, bucket_name, 'rule1', 1, 'days1/') client, bucket_name, 'rule1', 1, 'days1/')