Skip to content

Commit 9844984

Browse files
committed
Fix error action in all integration tests
1 parent 3de3677 commit 9844984

26 files changed

+113
-113
lines changed

tests/Integration/Resources/DSC_SqlAgentAlert.Integration.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Describe "<dscResourceFriendlyName>_Integration" -Tag @('Integration_SQL2016', '
107107
}
108108

109109
It 'Should return $true when Test-DscConfiguration is run' {
110-
Test-DscConfiguration -Verbose | Should -Be 'True'
110+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
111111
}
112112
}
113113

@@ -163,7 +163,7 @@ Describe "<dscResourceFriendlyName>_Integration" -Tag @('Integration_SQL2016', '
163163
}
164164

165165
It 'Should return $true when Test-DscConfiguration is run' {
166-
Test-DscConfiguration -Verbose | Should -Be 'True'
166+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
167167
}
168168
}
169169
}

tests/Integration/Resources/DSC_SqlAgentFailsafe.Integration.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
107107
}
108108

109109
It 'Should return $true when Test-DscConfiguration is run' {
110-
Test-DscConfiguration -Verbose | Should -Be 'True'
110+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
111111
}
112112
}
113113

@@ -163,7 +163,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
163163
}
164164

165165
It 'Should return $true when Test-DscConfiguration is run' {
166-
Test-DscConfiguration -Verbose | Should -Be 'True'
166+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
167167
}
168168
}
169169
}

tests/Integration/Resources/DSC_SqlAgentOperator.Integration.Tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
107107
}
108108

109109
It 'Should return $true when Test-DscConfiguration is run' {
110-
Test-DscConfiguration -Verbose | Should -Be 'True'
110+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
111111
}
112112
}
113113

@@ -163,7 +163,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
163163
}
164164

165165
It 'Should return $true when Test-DscConfiguration is run' {
166-
Test-DscConfiguration -Verbose | Should -Be 'True'
166+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
167167
}
168168
}
169169

@@ -219,7 +219,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
219219
}
220220

221221
It 'Should return $true when Test-DscConfiguration is run' {
222-
Test-DscConfiguration -Verbose | Should -Be 'True'
222+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
223223
}
224224
}
225225

@@ -275,7 +275,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
275275
}
276276

277277
It 'Should return $true when Test-DscConfiguration is run' {
278-
Test-DscConfiguration -Verbose | Should -Be 'True'
278+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
279279
}
280280
}
281281
}

tests/Integration/Resources/DSC_SqlAlwaysOnService.Integration.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag 'Skip' {
160160
}
161161

162162
It 'Should return $true when Test-DscConfiguration is run' {
163-
Test-DscConfiguration -Verbose | Should -Be 'True'
163+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
164164
}
165165
}
166166

@@ -214,7 +214,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag 'Skip' {
214214
}
215215

216216
It 'Should return $true when Test-DscConfiguration is run' {
217-
Test-DscConfiguration -Verbose | Should -Be 'True'
217+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
218218
}
219219
}
220220

tests/Integration/Resources/DSC_SqlAudit.Integration.Tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
147147
}
148148

149149
It 'Should return $true when Test-DscConfiguration is run' {
150-
Test-DscConfiguration -Verbose | Should -Be 'True'
150+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
151151
}
152152
}
153153

@@ -206,7 +206,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
206206
}
207207

208208
It 'Should return $true when Test-DscConfiguration is run' {
209-
Test-DscConfiguration -Verbose | Should -Be 'True'
209+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
210210
}
211211
}
212212

@@ -265,7 +265,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
265265
}
266266

267267
It 'Should return $true when Test-DscConfiguration is run' {
268-
Test-DscConfiguration -Verbose | Should -Be 'True'
268+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
269269
}
270270
}
271271

@@ -326,7 +326,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
326326
}
327327

328328
It 'Should return $true when Test-DscConfiguration is run' {
329-
Test-DscConfiguration -Verbose | Should -Be 'True'
329+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
330330
}
331331
}
332332

@@ -385,7 +385,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
385385
}
386386

387387
It 'Should return $true when Test-DscConfiguration is run' {
388-
Test-DscConfiguration -Verbose | Should -Be 'True'
388+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
389389
}
390390
}
391391
}

tests/Integration/Resources/DSC_SqlDatabase.Integration.Tests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
112112
}
113113

114114
It 'Should return $true when Test-DscConfiguration is run' {
115-
Test-DscConfiguration -Verbose | Should -Be 'True'
115+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
116116
}
117117
}
118118

@@ -170,7 +170,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
170170
}
171171

172172
It 'Should return $true when Test-DscConfiguration is run' {
173-
Test-DscConfiguration -Verbose | Should -Be 'True'
173+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
174174
}
175175
}
176176

@@ -228,7 +228,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
228228
}
229229

230230
It 'Should return $true when Test-DscConfiguration is run' {
231-
Test-DscConfiguration -Verbose | Should -Be 'True'
231+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
232232
}
233233
}
234234

@@ -286,7 +286,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
286286
}
287287

288288
It 'Should return $true when Test-DscConfiguration is run' {
289-
Test-DscConfiguration -Verbose | Should -Be 'True'
289+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
290290
}
291291
}
292292

@@ -344,7 +344,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
344344
}
345345

346346
It 'Should return $true when Test-DscConfiguration is run' {
347-
Test-DscConfiguration -Verbose | Should -Be 'True'
347+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
348348
}
349349
}
350350

@@ -405,7 +405,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
405405
}
406406

407407
It 'Should return $true when Test-DscConfiguration is run' {
408-
Test-DscConfiguration -Verbose | Should -Be 'True'
408+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
409409
}
410410
}
411411

tests/Integration/Resources/DSC_SqlDatabaseDefaultLocation.Integration.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
106106
}
107107

108108
It 'Should return $true when Test-DscConfiguration is run' {
109-
Test-DscConfiguration -Verbose | Should -Be 'True'
109+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
110110
}
111111
}
112112

@@ -161,7 +161,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
161161
}
162162

163163
It 'Should return $true when Test-DscConfiguration is run' {
164-
Test-DscConfiguration -Verbose | Should -Be 'True'
164+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
165165
}
166166
}
167167

@@ -217,7 +217,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
217217
}
218218

219219
It 'Should return $true when Test-DscConfiguration is run' {
220-
Test-DscConfiguration -Verbose | Should -Be 'True'
220+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
221221
}
222222
}
223223
}

tests/Integration/Resources/DSC_SqlDatabaseMail.Integration.Tests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
114114
}
115115

116116
It 'Should return $true when Test-DscConfiguration is run' {
117-
Test-DscConfiguration -Verbose | Should -Be 'True'
117+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
118118
}
119119
}
120120

@@ -159,7 +159,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
159159
}
160160

161161
It 'Should return $true when Test-DscConfiguration is run' {
162-
Test-DscConfiguration -Verbose | Should -Be 'True'
162+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
163163
}
164164
}
165165

@@ -222,7 +222,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
222222
}
223223

224224
It 'Should return $true when Test-DscConfiguration is run' {
225-
Test-DscConfiguration -Verbose | Should -Be 'True'
225+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
226226
}
227227
}
228228
}

tests/Integration/Resources/DSC_SqlDatabaseObjectPermission.Integration.Tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
230230
}
231231

232232
It 'Should return $true when Test-DscConfiguration is run' {
233-
Test-DscConfiguration -Verbose | Should -Be 'True'
233+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
234234
}
235235
}
236236

@@ -305,7 +305,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
305305
}
306306

307307
It 'Should return $true when Test-DscConfiguration is run' {
308-
Test-DscConfiguration -Verbose | Should -Be 'True'
308+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
309309
}
310310
}
311311

@@ -374,7 +374,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
374374
}
375375

376376
It 'Should return $true when Test-DscConfiguration is run' {
377-
Test-DscConfiguration -Verbose | Should -Be 'True'
377+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
378378
}
379379
}
380380

@@ -456,7 +456,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
456456
}
457457

458458
It 'Should return $true when Test-DscConfiguration is run' {
459-
Test-DscConfiguration -Verbose | Should -Be 'True'
459+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
460460
}
461461
}
462462

@@ -535,7 +535,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
535535
}
536536

537537
It 'Should return $true when Test-DscConfiguration is run' {
538-
Test-DscConfiguration -Verbose | Should -Be 'True'
538+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
539539
}
540540
}
541541
}

tests/Integration/Resources/DSC_SqlDatabasePermission.Integration.Tests.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
118118
}
119119

120120
It 'Should return $true when Test-DscConfiguration is run' {
121-
Test-DscConfiguration -Verbose | Should -Be 'True'
121+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
122122
}
123123
}
124124

@@ -184,7 +184,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
184184
}
185185

186186
It 'Should return $true when Test-DscConfiguration is run' {
187-
Test-DscConfiguration -Verbose | Should -Be 'True'
187+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
188188
}
189189
}
190190

@@ -255,7 +255,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
255255
}
256256

257257
It 'Should return $true when Test-DscConfiguration is run' {
258-
Test-DscConfiguration -Verbose | Should -Be 'True'
258+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
259259
}
260260
}
261261

@@ -330,7 +330,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
330330
}
331331

332332
It 'Should return $true when Test-DscConfiguration is run' {
333-
Test-DscConfiguration -Verbose | Should -Be 'True'
333+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
334334
}
335335
}
336336

@@ -395,7 +395,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
395395
}
396396

397397
It 'Should return $true when Test-DscConfiguration is run' {
398-
Test-DscConfiguration -Verbose | Should -Be 'True'
398+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
399399
}
400400
}
401401

@@ -460,7 +460,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
460460
}
461461

462462
It 'Should return $true when Test-DscConfiguration is run' {
463-
Test-DscConfiguration -Verbose | Should -Be 'True'
463+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
464464
}
465465
}
466466

@@ -525,7 +525,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
525525
}
526526

527527
It 'Should return $true when Test-DscConfiguration is run' {
528-
Test-DscConfiguration -Verbose | Should -Be 'True'
528+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
529529
}
530530
}
531531

@@ -590,7 +590,7 @@ Describe "$($script:dscResourceName)_Integration" -Tag @('Integration_SQL2016',
590590
}
591591

592592
It 'Should return $true when Test-DscConfiguration is run' {
593-
Test-DscConfiguration -Verbose | Should -Be 'True'
593+
Test-DscConfiguration -Verbose -ErrorAction 'Stop' | Should -Be 'True'
594594
}
595595
}
596596

0 commit comments

Comments
 (0)