|
1 | 1 | require 'spec_helper_acceptance'
|
2 | 2 |
|
3 | 3 | 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 |
7 | 12 | class { 'puppet::master':}
|
8 |
| - EOS |
| 13 | + EOS |
9 | 14 |
|
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) |
15 | 19 | end
|
| 20 | + end |
16 | 21 |
|
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 |
20 | 30 | class { 'puppet::master':
|
21 | 31 | storeconfigs => true,
|
22 | 32 | storeconfigs_dbserver => 'puppetdb.foo.local',
|
23 | 33 | puppetdb_strict_validation => false,
|
24 | 34 | }
|
25 |
| - EOS |
| 35 | + EOS |
26 | 36 |
|
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) |
32 | 41 | end
|
| 42 | + end |
33 | 43 |
|
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 |
38 | 53 | class { 'puppetdb': }
|
39 | 54 | class { 'puppet::master':
|
40 | 55 | storeconfigs => true,
|
41 | 56 | }
|
42 |
| - EOS |
| 57 | + EOS |
43 | 58 |
|
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) |
49 | 63 | end
|
| 64 | + end |
50 | 65 | end
|
0 commit comments