Closed baron1405 closed 4 years ago
Thanks for your report. I think the issue you're experiencing is fixed by https://github.com/puppetlabs/puppet_litmus/pull/226 . Can you confirm that current master fixes this for you?
@DavidS I'd be happy to try this but can you tell me what to put where to ensure I am testing against the current master. Thanks!
You can use the git source in the Gemfile
of your module to point to this repository and use master (or any other repo and branch).
Since we did a number of releases since then, you can now also upgrade to the newest PDK instead and use the version shipped there.
Feel free to re-open this, or file a new issue if this is still a problem for you.
Hi @DavidS I'm still seeing this issue despite being on the latest PDK: pdk --version 1.18.1
Error Message:
08:12:23 1) user and configuration validation Command "/sbin/sssctl config-check" exit_status
08:12:23 On host `127.0.0.1:2201'
08:12:23 Failure/Error: its(:exit_status) { is_expected.to eq(0) }
08:12:23 ArgumentError:
08:12:23 wrong number of arguments (given 1, expected 2)
08:12:23
08:12:23 # /root/.pdk/cache/ruby/2.5.0/gems/bolt-2.19.0/lib/bolt_spec/run.rb:51:in `run_command'
08:12:23 # /opt/puppetlabs/pdk/share/cache/ruby/2.5.0/gems/serverspec-2.41.5/lib/serverspec/type/command.rb:23:in `command_result'
08:12:23 # /opt/puppetlabs/pdk/share/cache/ruby/2.5.0/gems/serverspec-2.41.5/lib/serverspec/type/command.rb:18:in `exit_status'
08:12:23 # ./spec/acceptance/validation_spec.rb:40:in `block (3 levels) in <top (required)>'
Code Ran:
describe command('/sbin/sssctl config-check') do
its(:exit_status) { is_expected.to eq(0) }
end
Could you please advise?
Describe the Bug
Attempting to call linux_kernel_parameter from my Litmus acceptance tests results in:
Looking at the code identified in the stack trace we find that the ServerSpec linux_kernel_parameter code call run_command on line 4 as:
However, this results in a call to BoltSpec::Run's run_command which is defined as:
So ServerSpec passes a single argument but BoltSpec expects two arguments.
This problem appears to effect all ServerSpec types that call run_command.
Expected Behavior
Successful call to linux_kernel_parameter.
Steps to Reproduce
Here is the relevant portion of my acceptance test:
Environment