-
-
Notifications
You must be signed in to change notification settings - Fork 164
/
puppetboard_spec.rb
31 lines (26 loc) · 1.08 KB
/
puppetboard_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true
require 'spec_helper'
describe 'puppetboard', type: :class do
on_supported_os.each do |os, facts|
context "on #{os}" do
let :facts do
facts
end
# With version == 'latest' $secret_key is de facto required
let(:params) { { 'secret_key' => 'this_should_be_a_long_secret_string', } }
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('puppetboard') }
it { is_expected.to contain_group('puppetboard') }
it { is_expected.to contain_user('puppetboard') }
if ['FreeBSD'].include?(facts[:os]['family'])
it { is_expected.to contain_package('py39-puppetboard') }
it { is_expected.not_to contain_file('/srv/puppetboard') }
else
it { is_expected.to contain_file('/srv/puppetboard/puppetboard/settings.py') }
it { is_expected.to contain_file('/srv/puppetboard') }
it { is_expected.to contain_python__pyvenv('/srv/puppetboard/virtenv-puppetboard') }
it { is_expected.to contain_python__pip('puppetboard') }
end
end
end
end