Skip to content

Sensitive parameter support broken of mysql::password  #1563

Closed
@cruelsmith

Description

@cruelsmith

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions