diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2017-08-11 09:56:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 09:56:53 +0100 |
commit | c7ac34da3a8b70500143e326f8c4fa27ae7da311 (patch) | |
tree | 26721306dc6501ada77e48111b8e94f9856cf0b8 /spec/functions/pw_hash_spec.rb | |
parent | b89d5f388ca701e38a0e0337408f5ccb7e68565f (diff) | |
parent | 016f4dfd7f0c8a6b5b98fa38cf70434603c75883 (diff) |
Merge branch 'master' into release
Diffstat (limited to 'spec/functions/pw_hash_spec.rb')
-rw-r--r-- | spec/functions/pw_hash_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/functions/pw_hash_spec.rb b/spec/functions/pw_hash_spec.rb index df5348c..9e03464 100644 --- a/spec/functions/pw_hash_spec.rb +++ b/spec/functions/pw_hash_spec.rb @@ -65,5 +65,13 @@ describe 'pw_hash' do it { is_expected.to run.with_params('password', 'sha-256', 'salt').and_return('$5$salt$Gcm6FsVtF/Qa77ZKD.iwsJlCVPY0XSMgLJL0Hnww/c1') } it { is_expected.to run.with_params('password', 'sha-512', 'salt').and_return('$6$salt$IxDD3jeSOb5eB1CX5LBsqZFVkJdido3OUILO5Ifz5iwMuTS4XMS130MTSuDDl3aCI6WouIL9AjRbLCelDCy.g.') } end + + if Puppet::Util::Package.versioncmp(Puppet.version, '4.7.0') >= 0 + describe 'when arguments are sensitive' do + it { is_expected.to run.with_params(Puppet::Pops::Types::PSensitiveType::Sensitive.new('password'), 'md5', 'salt').and_return('$1$salt$qJH7.N4xYta3aEG/dfqo/0') } + it { is_expected.to run.with_params(Puppet::Pops::Types::PSensitiveType::Sensitive.new('password'), 'md5', Puppet::Pops::Types::PSensitiveType::Sensitive.new('salt')).and_return('$1$salt$qJH7.N4xYta3aEG/dfqo/0') } + it { is_expected.to run.with_params('password', 'md5', Puppet::Pops::Types::PSensitiveType::Sensitive.new('salt')).and_return('$1$salt$qJH7.N4xYta3aEG/dfqo/0') } + end + end end end |