Skip to content

Commit 974aab3

Browse files
Cleanup most of the missing variables for the rspec tests
1 parent d94f97f commit 974aab3

File tree

5 files changed

+60
-29
lines changed

5 files changed

+60
-29
lines changed

spec/acceptance/master_spec.rb

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,65 @@
11
require 'spec_helper_acceptance'
22

33
describe 'master tests:' do
4-
context 'without puppetdb' do
5-
it 'puppet::master class should work with no errors' do
6-
pp = <<-EOS
4+
context 'without puppetdb' do
5+
let :facts do
6+
{
7+
:processorcount => '2'
8+
}
9+
end
10+
it 'puppet::master class should work with no errors' do
11+
pp = <<-EOS
712
class { 'puppet::master':}
8-
EOS
13+
EOS
914

10-
# Run it twice and test for idempotency
11-
apply_manifest(pp, :catch_failures => true)
12-
#TODO fix me, should apply cleanly on one run
13-
#apply_manifest(pp, :catch_changes => true)
14-
end
15+
# Run it twice and test for idempotency
16+
apply_manifest(pp, :catch_failures => true)
17+
#TODO fix me, should apply cleanly on one run
18+
#apply_manifest(pp, :catch_changes => true)
1519
end
20+
end
1621

17-
context 'with external puppetdb' do
18-
it 'puppet::master class should work with no errors' do
19-
pp = <<-EOS
22+
context 'with external puppetdb' do
23+
let :facts do
24+
{
25+
:processorcount => '2'
26+
}
27+
end
28+
it 'puppet::master class should work with no errors' do
29+
pp = <<-EOS
2030
class { 'puppet::master':
2131
storeconfigs => true,
2232
storeconfigs_dbserver => 'puppetdb.foo.local',
2333
puppetdb_strict_validation => false,
2434
}
25-
EOS
35+
EOS
2636

27-
# Run it twice and test for idempotency
28-
apply_manifest(pp, :catch_failures => true)
29-
#TODO fix me, should apply cleanly on one run
30-
#apply_manifest(pp, :catch_changes => true)
31-
end
37+
# Run it twice and test for idempotency
38+
apply_manifest(pp, :catch_failures => true)
39+
#TODO fix me, should apply cleanly on one run
40+
#apply_manifest(pp, :catch_changes => true)
3241
end
42+
end
3343

34-
# This test has to be after the non-puppetdb tests
35-
context 'with puppetdb' do
36-
it 'puppet::master class should work with no errors' do
37-
pp = <<-EOS
44+
# This test has to be after the non-puppetdb tests
45+
context 'with puppetdb' do
46+
let :facts do
47+
{
48+
:processorcount => '2'
49+
}
50+
end
51+
it 'puppet::master class should work with no errors' do
52+
pp = <<-EOS
3853
class { 'puppetdb': }
3954
class { 'puppet::master':
4055
storeconfigs => true,
4156
}
42-
EOS
57+
EOS
4358

44-
# Run it twice and test for idempotency
45-
apply_manifest(pp, :catch_failures => true)
46-
#TODO fix me, should apply cleanly on one run
47-
#apply_manifest(pp, :catch_changes => true)
48-
end
59+
# Run it twice and test for idempotency
60+
apply_manifest(pp, :catch_failures => true)
61+
#TODO fix me, should apply cleanly on one run
62+
#apply_manifest(pp, :catch_changes => true)
4963
end
64+
end
5065
end

spec/classes/puppet_master_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
:operatingsystem => 'Debian',
1010
:operatingsystemrelease => '5',
1111
:concat_basedir => '/nde',
12+
:lsbdistcodename => 'lenny',
13+
:processorcount => '2'
1214
}
1315
end
1416
let (:params) do
@@ -178,6 +180,7 @@
178180
:operatingsystem => 'RedHat',
179181
:operatingsystemrelease => '6',
180182
:concat_basedir => '/nde',
183+
:processorcount => '2'
181184
}
182185
end
183186
let (:params) do
@@ -344,6 +347,7 @@
344347
:operatingsystem => 'RedHat',
345348
:operatingsystemrelease => '6',
346349
:concat_basedir => '/nde',
350+
:processorcount => '2'
347351
}
348352
end
349353
let (:params) do {
@@ -376,6 +380,7 @@
376380
:operatingsystem => 'RedHat',
377381
:operatingsystemrelease => '6',
378382
:concat_basedir => '/nde',
383+
:processorcount => '2'
379384
}
380385
end
381386
let (:params) do {

spec/classes/puppet_passenger_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
:operatingsystem => 'debian',
2525
:operatingsystemrelease => '5',
2626
:concat_basedir => '/dne',
27+
:lsbdistcodename => 'lenny',
2728
}
2829
end
2930
it {

spec/classes/puppet_repo_puppetlabs_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
:osfamily => 'Debian',
99
:lsbdistcodename => 'Precise',
10-
:lsbdistid => 'Ubuntu'
10+
:lsbdistid => 'Ubuntu',
1111
}
1212
end
1313
it 'should contain puppetlabs apt repos' do

spec/defines/puppet_masterenv_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
let :title do
66
'dev'
77
end
8+
let :facts do
9+
{
10+
:processorcount => '2'
11+
}
12+
end
813

914
let :params do
1015
{
@@ -34,6 +39,11 @@
3439
let :title do
3540
'dev'
3641
end
42+
let :facts do
43+
{
44+
:processorcount => '2'
45+
}
46+
end
3747

3848
let :params do
3949
{

0 commit comments

Comments
 (0)