Skip to content

Commit 79432cd

Browse files
committed
fix order
1 parent aefc062 commit 79432cd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/puppet/functions/postgresql/postgresql_password.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
return_type 'Variant[String, Sensitive[String]]'
2727
end
2828

29-
def default_impl(username, password, hash = 'md5', sensitive = false, salt = nil)
29+
def default_impl(username, password, sensitive = false, hash = 'md5', salt = nil)
3030
password = password.unwrap if password.respond_to?(:unwrap)
3131
pass = if hash == 'md5'
3232
'md5' + Digest::MD5.hexdigest(password.to_s + username.to_s)

manifests/server/role.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@
140140
$pwd_hash_sql = postgresql::postgresql_password(
141141
$username,
142142
$password_hash,
143-
$hash,
144143
$password_hash =~ Sensitive[String],
144+
$hash,
145145
$salt,
146146
)
147147
}

spec/spec_helper_local.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ def param(type, title, param)
4848
it { is_expected.not_to eq(nil) }
4949

5050
it {
51-
is_expected.to run.with_params('foo', 'bar', 'md5').and_return(
51+
is_expected.to run.with_params('foo', 'bar').and_return(
5252
'md596948aad3fcae80c08a35c9b5958cd89'
5353
)
5454
}
5555
it {
56-
is_expected.to run.with_params('foo', 1234, 'md5').and_return(
56+
is_expected.to run.with_params('foo', 1234).and_return(
5757
'md539a0e1b308278a8de5e007cd1f795920'
5858
)
5959
}
6060
it {
61-
is_expected.to run.with_params('foo', 'bar', 'scram-sha-256').and_return(
61+
is_expected.to run.with_params('foo', 'bar', nil, 'scram-sha-256').and_return(
6262
'SCRAM-SHA-256$4096:YmFy$y1VOaTvvs4V3OECvMzre9FtgCZClGuBLVE6sNPsTKbs=:HwFqmSKbihSyHMqkhufOy++cWCFIoTRSg8y6YgeALzE='
6363
)
6464
}
6565
it {
66-
is_expected.to run.with_params('foo', 'bar', 'scram-sha-256', nil, 'salt').and_return(
66+
is_expected.to run.with_params('foo', 'bar', nil, 'scram-sha-256', 'salt').and_return(
6767
'SCRAM-SHA-256$4096:c2FsdA==$zOt2zFfUQMbpQf3/vRnYB33QDK/L7APOBHniLy39j/4=:DcW5Jp8Do7wYhVp1f9aT0cyhUfzIAozGcvzXZj+M3YI='
6868
)
6969
}

0 commit comments

Comments
 (0)