mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Support NonCurrentVersion[Expiration,Transition] for s3 lifecycle.
This commit is contained in:
parent
de90f98574
commit
8a2066af07
2 changed files with 30 additions and 2 deletions
|
|
@ -277,6 +277,11 @@ Shindo.tests('Fog::Storage[:aws] | bucket requests', ["aws"]) do
|
|||
Fog::Storage[:aws].put_bucket_lifecycle(@aws_bucket_name, lifecycle)
|
||||
Fog::Storage[:aws].get_bucket_lifecycle(@aws_bucket_name).body
|
||||
end
|
||||
lifecycle = {'Rules' => [{'ID' => 'test rule', 'Prefix' => '/prefix', 'Enabled' => true, 'NonCurrentVersionExpiration' => {'Days' => 42}, 'NonCurrentVersionTransition' => {'Days' => 6, 'StorageClass'=>'GLACIER'}}]}
|
||||
tests('versioned transition').returns(lifecycle) do
|
||||
Fog::Storage[:aws].put_bucket_lifecycle(@aws_bucket_name, lifecycle)
|
||||
Fog::Storage[:aws].get_bucket_lifecycle(@aws_bucket_name).body
|
||||
end
|
||||
lifecycle = {'Rules' => [{'ID' => 'test rule', 'Prefix' => '/prefix', 'Enabled' => true, 'Expiration' => {'Date' => '2012-12-31T00:00:00.000Z'}}]}
|
||||
tests('date').returns(lifecycle) do
|
||||
Fog::Storage[:aws].put_bucket_lifecycle(@aws_bucket_name, lifecycle)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue