-
Notifications
You must be signed in to change notification settings - Fork 115
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 support for Ruby 2.5 as its close to EOL #782
Changes from all commits
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 |
---|---|---|
|
@@ -177,11 +177,16 @@ def test_validate_definition_doesnt_log_raw_output_for_sensitive_resources | |
resource = DummySensitiveResource.new | ||
kubectl.expects(:server_version).returns(Gem::Version.new('1.20')) | ||
|
||
kubectl.expects(:run).with { |*_args, **kwargs| kwargs[:output_is_sensitive] == true }.returns([ | ||
"Some Raw Output", | ||
"Error from kubectl: something went wrong and by the way here's your secret: S3CR3T", | ||
stub(success?: false), | ||
]) | ||
kubectl.expects(:run) | ||
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. That's strange that this changed just from the Ruby version :/ I would have that it specific to Mocha. Regardless, I think it's ok for now, though I'm not a huge fan of introducing so much static info into the stub :( 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. Ruby 2.7 deprecated some stuff with keyword args I haven't fully read up on it https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ but maybe this smells like it could be related. |
||
.with('apply', '-f', "/tmp/foo/bar", "--dry-run=server", '--output=name', { | ||
log_failure: false, output_is_sensitive: true, | ||
retry_whitelist: [:client_timeout, :empty, :context_deadline], attempts: 3 | ||
}) | ||
.returns([ | ||
"Some Raw Output", | ||
"Error from kubectl: something went wrong and by the way here's your secret: S3CR3T", | ||
stub(success?: false), | ||
]) | ||
resource.validate_definition(kubectl) | ||
refute_includes(resource.validation_error_msg, 'S3CR3T') | ||
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.
👍 (Assuming the idea is to test each version of ruby w/o building an entire matrix)
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.
yup! 2.6 default and then 2.7 and 3 on single k8s versions