@@ -57,8 +57,10 @@ def is_device_apply_supported?
57
57
f . write 'notify { "foo": }'
58
58
f . close
59
59
60
- stdout_str , _status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
60
+ stdout_str , status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
61
+ expect ( status . exitstatus ) . to eq 0
61
62
expect ( stdout_str ) . not_to match %r{Value type mismatch}
63
+ expect ( stdout_str ) . not_to match %r{Error}
62
64
63
65
expect ( stdout_str ) . to match %r{transport connection_info:}
64
66
expect ( stdout_str ) . to match %r{:username=>"foo"}
@@ -88,12 +90,15 @@ def is_device_apply_supported?
88
90
f . write 'notify { "foo": }'
89
91
f . close
90
92
91
- stdout_str , _status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
93
+ stdout_str , status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
94
+ expect ( stdout_str ) . to match %r{Error}
92
95
expect ( stdout_str ) . to match %r{Value type mismatch}
93
96
expect ( stdout_str ) . to match %r{secret_string: << redacted value >> }
94
97
expect ( stdout_str ) . not_to match %r{optional_secret}
95
98
expect ( stdout_str ) . not_to match %r{array_secret}
96
99
expect ( stdout_str ) . not_to match %r{variant_secret}
100
+
101
+ expect ( status . exitstatus ) . to eq 1
97
102
end
98
103
end
99
104
end
@@ -116,12 +121,15 @@ def is_device_apply_supported?
116
121
f . write 'notify { "foo": }'
117
122
f . close
118
123
119
- stdout_str , _status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
124
+ stdout_str , status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
125
+ expect ( stdout_str ) . to match %r{Error}
120
126
expect ( stdout_str ) . to match %r{Value type mismatch}
121
127
expect ( stdout_str ) . not_to match %r{secret_string }
122
128
expect ( stdout_str ) . to match %r{optional_secret: << redacted value >>}
123
129
expect ( stdout_str ) . not_to match %r{array_secret}
124
130
expect ( stdout_str ) . not_to match %r{variant_secret}
131
+
132
+ expect ( status . exitstatus ) . to eq 1
125
133
end
126
134
end
127
135
end
@@ -144,12 +152,15 @@ def is_device_apply_supported?
144
152
f . write 'notify { "foo": }'
145
153
f . close
146
154
147
- stdout_str , _status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
155
+ stdout_str , status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
156
+ expect ( stdout_str ) . to match %r{Error}
148
157
expect ( stdout_str ) . to match %r{Value type mismatch}
149
158
expect ( stdout_str ) . not_to match %r{secret_string }
150
159
expect ( stdout_str ) . not_to match %r{optional_secret}
151
160
expect ( stdout_str ) . to match %r{array_secret: << redacted value >>}
152
161
expect ( stdout_str ) . not_to match %r{variant_secret}
162
+
163
+ expect ( status . exitstatus ) . to eq 1
153
164
end
154
165
end
155
166
end
@@ -172,12 +183,15 @@ def is_device_apply_supported?
172
183
f . write 'notify { "foo": }'
173
184
f . close
174
185
175
- stdout_str , _status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
186
+ stdout_str , status = Open3 . capture2e ( "puppet device #{ common_args } --deviceconfig #{ device_conf . path } --apply #{ f . path } " )
187
+ expect ( stdout_str ) . to match %r{Error}
176
188
expect ( stdout_str ) . to match %r{Value type mismatch}
177
189
expect ( stdout_str ) . not_to match %r{secret_string }
178
190
expect ( stdout_str ) . not_to match %r{optional_secret}
179
191
expect ( stdout_str ) . not_to match %r{array_secret}
180
192
expect ( stdout_str ) . to match %r{variant_secret: << redacted value >>}
193
+
194
+ expect ( status . exitstatus ) . to eq 1
181
195
end
182
196
end
183
197
end
0 commit comments