-
Notifications
You must be signed in to change notification settings - Fork 35
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
(MODULES-10357) Fix proxy => absent
#24
Conversation
proxy => absent
proxy => absent
I've marked it WIP whilst I investigate whether I can easily extend the acceptance testing to cover |
The provider is expecting `absent` to be a symbol. From https://puppet.com/docs/puppet/latest/custom_types.html > The default munge method converts any values that are specifically allowed into symbols. If you override either of these methods, note that you lose this value handling and symbol conversion, which you’ll have to call super for.
0f03027
to
8008e96
Compare
apply_manifest(pp, catch_changes: true) | ||
end | ||
|
||
if fact('os.release.major') == '8' |
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.
As much as I can be, I think this test should execute correctly. beaker-rspec doesn't appear to support EL8 though.
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.
NameError:
uninitialized constant Beaker::HostPrebuiltSteps::RHEL8_PACKAGES
Did you mean? Beaker::HostPrebuiltSteps::SLES_PACKAGES
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.
Seems like this module is still on beaker 3.
RHEL8_PACKAGES
were added in beaker 4
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.
Good spot. I've tweaking the Gemfile and spec helper locally, and the tests do run on EL8. Probably not much point me committing any of these changes though as you'll prefer to migrate to litmus? (and if the tests could run in travis, that'd be helpful too).
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.
This test is currently failing on Fedora.
Can you please change the condition from ==8
to >=8
.
More info about this in the conversation of this PR: https://github.com/puppetlabs/puppetlabs-yumrepo_core/pull/22/files#diff-dc408e2d28dac43c3fdd4c2012e8d74bR314
@@ -4,12 +4,11 @@ | |||
|
|||
$LOAD_PATH << File.join(__dir__, 'acceptance/lib') | |||
|
|||
run_puppet_install_helper unless ENV['BEAKER_provision'] == 'no' |
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.
It was necessary to move this out of the Rspec.configure
block below. Otherwise, facter
isn't available when if fact('os.release.major') == '8'
runs.
PR updated to test |
proxy => absent
proxy => absent
@@ -321,7 +321,7 @@ | |||
|
|||
munge do |value| | |||
return '' if Facter.value(:operatingsystemmajrelease).to_i >= 8 && value.to_s == '_none_' | |||
value.to_s | |||
super(value) |
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.
The docs suggest super
instead of super(value)
. They need updating though?
Otherwise you get
Munging failed for value "http://proxy.example.com:3128" in class proxy: implicit argument passing of super from method defined by define_method() is not supported. Specify all arguments explicitly.
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.
Thanks for the heads-up, We'll create a docs ticket for this.
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 already left feedback on the page, so I guess a ticket should magic into existence anyway?
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.
Docs fixed! Thanks. 😄
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.
👍 Test are also passing on el-8
The provider is expecting
absent
to be a symbol.From https://puppet.com/docs/puppet/latest/custom_types.html