]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
rgw/bucket-logging: set retain date to the future 724/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, 27 Jan 2026 12:50:32 +0000 (18:20 +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>
(cherry picked from commit 03ee2030aaecc7e191488a7dba0f792634174045)

s3tests/functional/test_s3.py

index 29b3110ef94148febec30cdd6a0b06ecc7ff8c2e..7205c55fecc68a83e1c598b95d524ae1f742c6e3 100644 (file)
@@ -17576,7 +17576,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)