-
Notifications
You must be signed in to change notification settings - Fork 42
Fixes for Ruby 3.2 #372
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
Fixes for Ruby 3.2 #372
Changes from all commits
96c7d75
67bccd4
360aaee
c399f45
fdc23a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,7 +158,7 @@ | |
| it 'we return an error' do | ||
| allow_any_instance_of(described_class).to receive(:`).with("op --version").and_return(true) | ||
| allow_any_instance_of(described_class).to receive(:`).with("op get item --vault='Shared' 'password title' 2>&1").and_return('{key: value }') | ||
| expect { resolver.resolve(the_password) }.to raise_error(StackMaster::ParameterResolvers::OnePassword::OnePasswordInvalidResponse, /Failed to parse JSON returned, {key: value }: \d+: unexpected token at '{key: value }'/) | ||
| expect { resolver.resolve(the_password) }.to raise_error(StackMaster::ParameterResolvers::OnePassword::OnePasswordInvalidResponse, /Failed to parse JSON returned, {key: value }:.* unexpected token at '{key: value }'/) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Be more lenient with the error message expectation here. Different versions of Ruby provide slightly different error messages. |
||
| end | ||
| end | ||
| end | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ def resolve(value) | |
| let(:outputs) { [] } | ||
|
|
||
| before do | ||
| allow(StackMaster.cloud_formation_driver).to receive(:region).and_return(region) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stub out the default AWS region. This prevents specs failing in development environments where the default |
||
| allow(Aws::CloudFormation::Client).to receive(:new).and_return(cf) | ||
| cf.stub_responses(:describe_stacks, { stacks: stacks }) | ||
| end | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid stubbing
File.read. This resolves the flaky behaviour in CI.