Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit 1830291

Browse files
committed
Add rspec-puppet tests for thin puppetmaster
1 parent 9a8c81c commit 1830291

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ fixtures:
1515
inifile: "git://github.com/puppetlabs/puppetlabs-inifile.git"
1616
apache: "git://github.com/puppetlabs/puppetlabs-apache.git"
1717
portage: "git://github.com/gentoo/puppet-portage.git"
18+
thin: "git://github.com/danieldreier/puppet-thin.git"
1819
symlinks:
1920
puppet: "#{source_dir}"
2021

spec/classes/server_spec.rb

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,45 @@
160160
end
161161
end
162162
end
163+
describe "thin puppet::server" do
164+
let(:params) {{
165+
:servertype => 'thin',
166+
:storeconfigs => 'puppetdb',
167+
:manifest => '/etc/puppet/manifests/site.pp',
168+
:modulepath => ['/etc/puppet/environments/production/modules'],
169+
:ca => true,
170+
}}
171+
context 'Debian' do
172+
let(:facts) {{
173+
:operatingsystem => 'debian',
174+
:operatingsystemrelease => '7',
175+
:osfamily => 'debian',
176+
:puppetversion => '3.4.2',
177+
:concat_basedir => '/foo',
178+
:kernel => 'linux',
179+
:lsbdistid => 'debian',
180+
:lsbdistcodename => 'wheezy',
181+
}}
182+
it_behaves_like "all puppet master types"
183+
it_behaves_like "basic puppetmaster config"
184+
185+
it { should contain_package('puppetmaster') }
186+
187+
# Tests specific to passenger server
188+
it { should contain_class('puppet::server::thin') }
189+
190+
it do
191+
should contain_service('puppetmaster').with({
192+
:ensure => "stopped"
193+
})
194+
should contain_service('nginx').with({
195+
:ensure => "running"
196+
})
197+
should contain_service('thin-puppetmaster').with({
198+
:ensure => "running"
199+
})
200+
should contain_file('/etc/thin.d/puppetmaster.yml')
201+
end
202+
end
203+
end
163204
end

0 commit comments

Comments
 (0)