]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
rgw/bucket-logging: set retain date to the future 720/head
authorN Balachandran <nithya.balachandran@ibm.com>
Tue, 6 Jan 2026 05:10:59 +0000 (10:40 +0530)
committerN Balachandran <nithya.balachandran@ibm.com>
Tue, 6 Jan 2026 05:13:10 +0000 (10:43 +0530)
Sets the date for PutObjectRetention to 60 days in the
future.

Fixes: https://tracker.ceph.com/issues/74322
Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
s3tests/functional/test_s3.py

index ebbfe3f062f3c1b0b91208f0ee896ca789fce6f9..5fee6a75fbf754040b78691c540c36dfbc70f85a 100644 (file)
@@ -17623,7 +17623,7 @@ def test_bucket_logging_object_meta():
     # PutObjectLegalHold
     client.put_object_legal_hold(Bucket=src_bucket_name, Key=name, LegalHold={'Status': 'ON'})
     # PutObjectRetention
-    client.put_object_retention(Bucket=src_bucket_name, Key=name, Retention={'Mode': 'GOVERNANCE', 'RetainUntilDate': datetime.datetime(2026, 1, 1)})
+    client.put_object_retention(Bucket=src_bucket_name, Key=name, Retention={'Mode': 'GOVERNANCE', 'RetainUntilDate': datetime.datetime.now() + datetime.timedelta(days=60)})
 
     _flush_logs(client, src_bucket_name)
     response = client.list_objects_v2(Bucket=log_bucket_name)