|
1 | 1 | require 'spec_helper_acceptance'
|
2 | 2 |
|
3 |
| -describe 'postgresql_psql', unless: UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do |
| 3 | +describe 'postgresql_psql', unless: UNSUPPORTED_PLATFORMS.include?(os[:family]) do |
4 | 4 | pp_one = <<-MANIFEST
|
5 | 5 | class { 'postgresql::server': } ->
|
6 | 6 | postgresql_psql { 'foobar':
|
@@ -38,8 +38,7 @@ class { 'postgresql::server': } ->
|
38 | 38 | }
|
39 | 39 | MANIFEST
|
40 | 40 | it 'does not run SQL when the unless query returns rows' do
|
41 |
| - apply_manifest(pp_three, catch_failures: true) |
42 |
| - apply_manifest(pp_three, catch_changes: true) |
| 41 | + idempotent_apply(default, pp_three) |
43 | 42 | end
|
44 | 43 |
|
45 | 44 | pp_four = <<-MANIFEST
|
@@ -69,8 +68,7 @@ class { 'postgresql::server': } ->
|
69 | 68 | }
|
70 | 69 | MANIFEST
|
71 | 70 | it 'does not run SQL when the unless query returns no rows' do
|
72 |
| - apply_manifest(pp_five, catch_failures: true) |
73 |
| - apply_manifest(pp_five, catch_changes: true) |
| 71 | + idempotent_apply(default, pp_five) |
74 | 72 | end
|
75 | 73 |
|
76 | 74 | pp_six = <<-MANIFEST.unindent
|
@@ -166,8 +164,7 @@ class { 'postgresql::server': } ->
|
166 | 164 | }
|
167 | 165 | MANIFEST
|
168 | 166 |
|
169 |
| - apply_manifest(pp, catch_failures: true) |
170 |
| - apply_manifest(pp, expect_changes: false) |
| 167 | + idempotent_apply(default, pp) |
171 | 168 | end
|
172 | 169 | end
|
173 | 170 | end
|
0 commit comments