mirror of
https://github.com/rustfs/rustfs.git
synced 2026-12-02 22:26:21 +00:00
test(s3): compare tagged object expiry against UTC
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
--- a/s3tests/functional/test_s3.py
|
||||
+++ b/s3tests/functional/test_s3.py
|
||||
@@ -9230,7 +9230,7 @@
|
||||
# stat the object, check header
|
||||
response = client.head_object(Bucket=bucket_name, Key=key1)
|
||||
assert response['ResponseMetadata']['HTTPStatusCode'] == 200
|
||||
- assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1)
|
||||
+ assert check_lifecycle_expiration_header(response, _utcnow_naive(), 'rule1', 1)
|
||||
|
||||
# test that header is not returning when it should not
|
||||
lifecycle={
|
||||
@@ -9252,7 +9252,7 @@
|
||||
# stat the object, check header
|
||||
response = client.head_object(Bucket=bucket_name, Key=key1)
|
||||
assert response['ResponseMetadata']['HTTPStatusCode'] == 200
|
||||
- assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1) == False
|
||||
+ assert check_lifecycle_expiration_header(response, _utcnow_naive(), 'rule1', 1) == False
|
||||
|
||||
@pytest.mark.lifecycle
|
||||
@pytest.mark.lifecycle_expiration
|
||||
@@ -9298,7 +9298,7 @@
|
||||
# stat the object, check header
|
||||
response = client.head_object(Bucket=bucket_name, Key=key1)
|
||||
assert response['ResponseMetadata']['HTTPStatusCode'] == 200
|
||||
- assert check_lifecycle_expiration_header(response, datetime.datetime.now(None), 'rule1', 1) == False
|
||||
+ assert check_lifecycle_expiration_header(response, _utcnow_naive(), 'rule1', 1) == False
|
||||
|
||||
@pytest.mark.lifecycle
|
||||
def test_lifecycle_set_noncurrent():
|
||||
Reference in New Issue
Block a user