Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Commit

Permalink
Add basic testing
Browse files Browse the repository at this point in the history
  • Loading branch information
genebean committed Apr 2, 2019
1 parent 96a9578 commit 4543928
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
require 'spec_helper'

describe 'windows_puppet_certificates' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge(
puppet_sslpaths: {
'privatedir' => {
'path' => 'C:/ProgramData/PuppetLabs/puppet/etc/ssl/private',
'path_exists' => true,
},
'privatekeydir' => {
'path' => 'C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys',
'path_exists' => true,
},
'publickeydir' => {
'path' => 'C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys',
'path_exists' => true,
},
'certdir' => {
'path' => 'C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs',
'path_exists' => true,
},
'requestdir' => {
'path' => 'C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests',
'path_exists' => true,
},
'hostcrl' => {
'path' => 'C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem',
'path_exists' => true,
},
},
)
end

context 'with defaults' do
it { is_expected.to compile.with_all_deps }
end

context 'with manage_client_cert => true' do
let(:params) do
{ 'manage_client_cert' => true }
end

it { is_expected.to compile.with_all_deps }
end
end
end
end

0 comments on commit 4543928

Please sign in to comment.