Skip to content

Sensitive parameter support broken of mysql::password #1563

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

Closed
cruelsmith opened this issue May 2, 2023 · 0 comments · Fixed by #1564
Closed

Sensitive parameter support broken of mysql::password #1563

cruelsmith opened this issue May 2, 2023 · 0 comments · Fixed by #1564

Comments

@cruelsmith
Copy link
Contributor

Describe the Bug

The puppet function mysql::password does not allow a second parameter anymore to toggle the return value to be a sensitive. Instead the puppet run fails with a wrong number of arguments message.

This issue has been introduced with #1557
effc684#diff-f63c8340e97cb15646da94767358abc703a41ba144fa217d9585e00b8a04b289L22-R22

Expected Behavior

  • Use
    mysql('password', true)
    
  • Returns
    sensitive('*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19')
    

Steps to Reproduce

  • Use
    mysql('password', true)
    
  • Fails with
    Error while evaluating a Function Call:
    
    wrong number of arguments (given 2, expected 1)
    

Environment

  • Module v14.0.0
  • Puppet 7.24.0
  • OracleLinux 7

Additional Context

Note: That the rspec test for this case is currently simply skipped instead of testing it. This needs to also be fixed via the same PR.

# Test of a Returnvalue of Datatype Sensitive does not work
it 'returns Sensitive with sensitive=true' do
skip 'should have a Returnvalue of Datatype Sensitive'
expect(subject).to run.with_params('password', true).and_return(sensitive('*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19'))
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants