Skip to content

Commit ac6c0d1

Browse files
authored
Fix error in trusted_ca::java with ensure absent
Fixes 96843d5.
1 parent 8c80b07 commit ac6c0d1

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

manifests/java.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
path => $trusted_ca::path,
6262
logoutput => on_failure,
6363
unless => "echo '' | keytool -list -keystore ${java_keystore} | grep -i ${name}",
64-
require => File["/tmp/${name}-trustedca"],
64+
require => File[$filename],
6565
}
6666
}

spec/defines/trusted_ca_java_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@
4747
with_command('keytool -import -noprompt -trustcacerts -alias mycert -file /tmp/mycert-trustedca -keystore /etc/alternatives/jre_1.7.0/lib/security/cacerts -storepass changeit')
4848
end
4949
end
50+
51+
context 'with filename' do
52+
let(:local_params) { { content: 'abc', filename: '/path/to/file' } }
53+
54+
it { is_expected.to compile.with_all_deps }
55+
it { is_expected.to contain_exec('import /path/to/file to jks /etc/alternatives/jre_1.7.0/lib/security/cacerts').that_requires('File[/path/to/file]') }
56+
end
5057
end
5158
end
5259
end

0 commit comments

Comments
 (0)