Skip to content

Commit

Permalink
Add specs for 'ca' pki mode in api feature
Browse files Browse the repository at this point in the history
  • Loading branch information
bobapple committed Jan 31, 2017
1 parent eb99f55 commit ba41808
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/classes/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
it { is_expected.to contain_file('/etc/icinga2/pki/ca.crt') }
end

context "#{os} with pki => ca" do
let(:params) { {:pki => 'ca'} }

it { is_expected.to contain_exec('icinga2 pki create certificate signing request') }
it { is_expected.to contain_exec('icinga2 pki sign certificate') }

it { is_expected.to contain_file('/etc/icinga2/pki/host.example.org.key') }
it { is_expected.to contain_file('/etc/icinga2/pki/host.example.org.crt') }
it { is_expected.to contain_file('/etc/icinga2/pki/ca.crt') }
end

context "#{os} with pki => foo (not a valid value)" do
let(:params) { {:pki => 'foo'} }
Expand Down

0 comments on commit ba41808

Please sign in to comment.