mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-21 23:29:47 +00:00
Merge pull request #532 from cbodley/wip-63537
object lock: test very large RetainUntilDate
This commit is contained in:
commit
6861c3d810
1 changed files with 3 additions and 1 deletions
|
@ -11839,9 +11839,11 @@ def test_object_lock_put_obj_retention():
|
||||||
key = 'file1'
|
key = 'file1'
|
||||||
response = client.put_object(Bucket=bucket_name, Body='abc', Key=key)
|
response = client.put_object(Bucket=bucket_name, Body='abc', Key=key)
|
||||||
version_id = response['VersionId']
|
version_id = response['VersionId']
|
||||||
retention = {'Mode':'GOVERNANCE', 'RetainUntilDate':datetime.datetime(2030,1,1,tzinfo=pytz.UTC)}
|
retention = {'Mode':'GOVERNANCE', 'RetainUntilDate':datetime.datetime(2140,1,1,tzinfo=pytz.UTC)}
|
||||||
response = client.put_object_retention(Bucket=bucket_name, Key=key, Retention=retention)
|
response = client.put_object_retention(Bucket=bucket_name, Key=key, Retention=retention)
|
||||||
assert response['ResponseMetadata']['HTTPStatusCode'] == 200
|
assert response['ResponseMetadata']['HTTPStatusCode'] == 200
|
||||||
|
response = client.get_object_retention(Bucket=bucket_name, Key=key)
|
||||||
|
assert response['Retention'] == retention
|
||||||
client.delete_object(Bucket=bucket_name, Key=key, VersionId=version_id, BypassGovernanceRetention=True)
|
client.delete_object(Bucket=bucket_name, Key=key, VersionId=version_id, BypassGovernanceRetention=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue