Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop warning if region is not us-east-1 in mock #717

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 0 additions & 4 deletions lib/fog/aws/requests/storage/put_bucket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ def put_bucket(bucket_name, options = {})
end
if !self.data[:buckets][bucket_name]
self.data[:buckets][bucket_name] = bucket
elsif self.region != 'us-east-1'
response.status = 409
Fog::Logger.warning "Your region '#{self.region}' does not match the default region 'us-east-1'"
raise(Excon::Errors.status_error({:expects => 201}, response))
end
response
end
Expand Down
10 changes: 0 additions & 10 deletions tests/requests/storage/bucket_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,6 @@
Fog::Storage[:aws].put_bucket_website('fognonbucket', 'index.html')
end

tests('put existing bucket - non-default region') do
storage_eu_endpoint = Fog::Storage[:aws]
storage_eu_endpoint.region = "eu-west-1"
storage_eu_endpoint.put_bucket(@aws_bucket_name)

tests("#put_bucket('#{@aws_bucket_name}') existing").raises(Excon::Errors::Conflict) do
storage_eu_endpoint.put_bucket(@aws_bucket_name)
end
end

tests("#put_bucket_website('fognonbucket', :RedirectAllRequestsTo => 'redirect.example.com')").raises(Excon::Errors::NotFound) do
Fog::Storage[:aws].put_bucket_website('fognonbucket', :RedirectAllRequestsTo => 'redirect.example.com')
end
Expand Down