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

Fixed a bug when a bucket was placed in us-east-1 #533

Merged
merged 1 commit into from
May 8, 2021

Conversation

soruma
Copy link
Contributor

@soruma soruma commented May 8, 2021

If a bucket is placed in us-east-1, location_constraint will return blank.

For example, when I wrote the following code, an error occurred.

require 'spec_helper'

describe s3_bucket('awspec-test') do
  it { should have_location('us-east-1') }
end
s3_bucket 'awspec-test'
  is expected to have location "us-east-1" (FAILED - 1)

Failures:

  1) s3_bucket 'awspec-test' is expected to have location "us-east-1"
     Failure/Error: it { should have_location('us-east-1') }
       expected `s3_bucket 'awspec-test'.has_location?("us-east-1")` to be truthy, got false
     # ./spec/s3_spec.rb:6:in `block (2 levels) in <top (required)>'

With this change, if location_constraint is blank, it will be recognized as us-east-1.

ref: #529 (comment)

@soruma soruma force-pushed the fix-default-s3-location branch from 6b5c388 to b258307 Compare May 8, 2021 05:12
@soruma soruma force-pushed the fix-default-s3-location branch from b258307 to b0a8db5 Compare May 8, 2021 05:25
Copy link
Owner

@k1LoW k1LoW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soruma Thank you !!

@k1LoW k1LoW merged commit 3828f82 into k1LoW:master May 8, 2021
@soruma soruma deleted the fix-default-s3-location branch May 8, 2021 22:03
@k1LoW
Copy link
Owner

k1LoW commented May 8, 2021

Released as v1.24.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants