-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Remove default empty string parameters #169
Conversation
Think I read accept' tests for 8 are currently broken somewhere.... |
After After #170 |
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.
LGTM
@@ -49,7 +49,7 @@ | |||
it { is_expected.to contain_concat_fragment('squid_header').without_content(%r{^err_page_stylesheet}) } | |||
end | |||
|
|||
context 'with all parameters set' do | |||
context 'with all parameters set' do # rubocop:todo RSpec/MultipleMemoizedHelpers |
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.
I got hit by this a lot… Maybe we should consider increase the limit, or disable the test completely?
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.
Yes.
I've tried re-arranging things to not get this elsewhere but don't quite understand how to avoid it.
For the defined types and parameters * For `squid::cache_dir` and the parameter `options` the default is now `undef` rather than `''` * For `squid::snmp_port` and the parameter `options` the default is now `undef` rather than `''` * For `squid::refresh_pattern` and the parameter `options` the default is now `undef` rather than `''` * For `squid::http_port` and the parameter `options` the default is now `undef` rather than `''` * For `squid::http_ports` and the parameter `options` the default is now `undef` rather than `''` This is backwards compatible for all cases except when `options` has been explicitly set to `''` but I feel that is a non-case. e.g. ```puppet squid::http_port{80: options => '', ``` would fail. Resolves the linter problem params_empty_string_assignment.
Disable RSpec/MultipleMemoizedHelpers with rubocop:todo as I am unsure what to do.
Pull Request (PR) description
For the defined types and parameters
squid::cache_dir
and the parameteroptions
the default is nowundef
rather than''
squid::snmp_port
and the parameteroptions
the default is nowundef
rather than''
squid::refresh_pattern
and the parameteroptions
the default is nowundef
rather than''
squid::http_port
and the parameteroptions
the default is nowundef
rather than''
squid::http_ports
and the parameteroptions
the default is nowundef
rather than''
This is backwards compatible for all cases except when
options
hasbeen explicitly set to
''
but I feel that is a non-case?e.g.
would fail.
Resolves the linter issues for
params_empty_string_assignment
.Extra commits include: