@@ -12,8 +12,7 @@ class { 'postgresql::server': } ->
12
12
}
13
13
MANIFEST
14
14
it 'alwayses run SQL' do
15
- apply_manifest ( pp_one , catch_failures : true )
16
- apply_manifest ( pp_one , expect_changes : true )
15
+ idempotent_apply ( pp_one )
17
16
end
18
17
19
18
pp_two = <<-MANIFEST
@@ -26,8 +25,7 @@ class { 'postgresql::server': } ->
26
25
}
27
26
MANIFEST
28
27
it 'runs some SQL when the unless query returns no rows' do
29
- apply_manifest ( pp_two , catch_failures : true )
30
- apply_manifest ( pp_two , expect_changes : true )
28
+ idempotent_apply ( pp_two )
31
29
end
32
30
33
31
pp_three = <<-MANIFEST
@@ -54,8 +52,7 @@ class { 'postgresql::server': } ->
54
52
}
55
53
MANIFEST
56
54
it 'does not run SQL when refreshed and the unless query returns rows' do
57
- apply_manifest ( pp_four , catch_failures : true )
58
- apply_manifest ( pp_four , expect_changes : true )
55
+ idempotent_apply ( pp_four )
59
56
end
60
57
61
58
context 'with refreshonly' do
@@ -85,8 +82,7 @@ class { 'postgresql::server': } ->
85
82
}
86
83
MANIFEST
87
84
it 'runs SQL when refreshed and the unless query returns no rows' do
88
- apply_manifest ( pp_six , catch_failures : true )
89
- apply_manifest ( pp_six , expect_changes : true )
85
+ idempotent_apply ( pp_six )
90
86
end
91
87
92
88
pp_seven = <<-MANIFEST . unindent
@@ -101,8 +97,7 @@ class { 'postgresql::server': } ->
101
97
}
102
98
MANIFEST
103
99
it 'does not run SQL when refreshed and the unless query returns rows' do
104
- apply_manifest ( pp_seven , catch_failures : true )
105
- apply_manifest ( pp_seven , expect_changes : true )
100
+ idempotent_apply ( pp_seven )
106
101
end
107
102
end
108
103
@@ -116,8 +111,7 @@ class { 'postgresql::server': } ->
116
111
}
117
112
MANIFEST
118
113
it 'does not run some SQL when the onlyif query returns no rows' do
119
- apply_manifest ( pp_eight , catch_failures : true )
120
- apply_manifest ( pp_eight , catch_changes : true )
114
+ idempotent_apply ( pp_eight )
121
115
end
122
116
123
117
pp_nine = <<-MANIFEST
@@ -130,8 +124,7 @@ class { 'postgresql::server': } ->
130
124
}
131
125
MANIFEST
132
126
it 'runs SQL when the onlyif query returns rows' do
133
- apply_manifest ( pp_nine , catch_failures : true )
134
- apply_manifest ( pp_nine , expect_changes : true )
127
+ idempotent_apply ( pp_nine )
135
128
end
136
129
137
130
context 'when setting sensitive => true' do
0 commit comments