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

Remove default empty string parameters #169

Merged
merged 7 commits into from
Mar 24, 2022

Conversation

traylenator
Copy link
Contributor

Pull Request (PR) description

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.

squid::http_port{80:
  options => '',

would fail.

Resolves the linter issues for params_empty_string_assignment.

Extra commits include:

  • modulesync 5.1.0 templates
  • rubocop corrections
  • Addition of docs SSLBump type

@traylenator
Copy link
Contributor Author

Think I read accept' tests for 8 are currently broken somewhere....

@traylenator
Copy link
Contributor Author

After After #170

Copy link
Member

@smortex smortex left a 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
Copy link
Member

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?

Copy link
Contributor Author

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.

bastelfreak and others added 6 commits March 24, 2022 09:00
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.
@traylenator traylenator merged commit 9a502a9 into voxpupuli:master Mar 24, 2022
@traylenator traylenator deleted the fixtests branch March 24, 2022 10:35
@traylenator traylenator mentioned this pull request Mar 24, 2022
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.

3 participants