Skip to content

Commit eec6f10

Browse files
committed
Fix broken sensitive parameter for mysql::password
Revert broken change of #1557 and fixes the spec test for it by removing the skip.
1 parent 37b2315 commit eec6f10

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

lib/puppet/functions/mysql/password.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
return_type 'Variant[String, Sensitive[String]]'
2020
end
2121

22-
def password(password, sensitive: false)
22+
def password(password, sensitive = false)
2323
password = password.unwrap if password.is_a?(Puppet::Pops::Types::PSensitiveType::Sensitive)
2424

2525
result_string = if %r{\*[A-F0-9]{40}$}.match?(password)

lib/puppet/functions/mysql_password.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
return_type 'Variant[String, Sensitive[String]]'
1616
end
1717

18-
def mysql_password(password, sensitive: false)
18+
def mysql_password(password, sensitive = false)
1919
call_function('deprecation', 'mysql_password', "This method has been deprecated, please use the namespaced version 'mysql::password' instead.")
2020
call_function('mysql::password', password, sensitive)
2121
end

spec/functions/mysql_password_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

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

0 commit comments

Comments
 (0)