Sha256: cfc3bccb801e5732bee1696d57cb2a767815ef87b4fb5598048d324f14758fba
Contents?: true
Size: 1.1 KB
Versions: 6
Compression:
Stored size: 1.1 KB
Contents
Shindo.tests('AWS::Storage | bucket requests', ['aws']) do tests('success') do @service_format = { 'Buckets' => [{ 'CreationDate' => Time, 'Name' => String, }], 'Owner' => { 'DisplayName' => String, 'ID' => String } } tests("#put_bucket('fogbuckettests')").succeeds do AWS[:storage].put_bucket('fogbuckettests') end tests("#get_service").formats(@service_format) do AWS[:storage].get_service.body end tests("#delete_bucket('fogbuckettests')").succeeds do AWS[:storage].delete_bucket('fogbuckettests') end end tests('failure') do tests("#delete_bucket('fognonbucket')").raises(Excon::Errors::NotFound) do AWS[:storage].delete_bucket('fognonbucket') end @bucket = AWS[:storage].directories.create(:key => 'fognonempty') @file = @bucket.files.create(:key => 'foo', :body => 'bar') tests("#delete_bucket('fognonempty')").raises(Excon::Errors::Conflict) do AWS[:storage].delete_bucket('fognonempty') end @file.destroy @bucket.destroy end end
Version data entries
6 entries across 6 versions & 1 rubygems