Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions spec/fog/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,18 @@
expect(resp['Code']).to include('NoSuchBucket')
end

it 'Should error is thrown when trying to create already existing bucket' do
bucket_name="test-bucket"+rand(36**16).to_s(36)
begin
@conn.put_bucket bucket_name
@conn.put_bucket bucket_name
rescue Exception => e
expect(XmlSimple.xml_in(e.response.body)['Code']).to include('BucketAlreadyExists')
ensure
@conn.delete_bucket bucket_name
end
end

# Test region is selected according to provider configuration
# check default region is used if no region provided explicitly
# There is need to set a env variable to support setting oss default bucket
Expand Down