Skip to content

Commit 373e658

Browse files
moredhelHamish Hutchings
authored andcommitted
Update tests to accomodate new output
Signed-off-by: Hamish Hutchings <[email protected]>
1 parent 2251f80 commit 373e658

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

acceptance.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
@test "Test command works with nested namespaces" {
7575
run ./conftest test --namespace main.gke -p examples/hcl1/policy/ examples/hcl1/gke.tf --no-color
7676
[ "$status" -eq 1 ]
77-
[ "${lines[1]}" = "1 test, 0 passed, 0 warnings, 1 failure, 0 exceptions" ]
77+
[ "${lines[1]}" = "1 test, 0 passed, 0 warnings, 1 failure, 0 exceptions, 0 exclusions" ]
7878
}
7979

8080
@test "Verify command has trace flag" {
@@ -267,13 +267,13 @@
267267
@test "The number of tests run is accurate" {
268268
run ./conftest test -p examples/kubernetes/policy examples/kubernetes/service.yaml --no-color
269269
[ "$status" -eq 0 ]
270-
[ "${lines[1]}" = "5 tests, 4 passed, 1 warning, 0 failures, 0 exceptions" ]
270+
[ "${lines[1]}" = "5 tests, 4 passed, 1 warning, 0 failures, 0 exceptions, 0 exclusions" ]
271271
}
272272

273273
@test "Exceptions reported correctly" {
274274
run ./conftest test -p examples/exceptions/policy examples/exceptions/deployments.yaml --no-color
275275
[ "$status" -eq 1 ]
276-
[ "${lines[2]}" = "2 tests, 0 passed, 0 warnings, 1 failure, 1 exception" ]
276+
[ "${lines[2]}" = "2 tests, 0 passed, 0 warnings, 1 failure, 1 exception, 0 exclusions" ]
277277
}
278278

279279
@test "Exceptions output" {
@@ -285,7 +285,7 @@
285285
@test "Suppress exceptions output" {
286286
run ./conftest test -p examples/exceptions/policy examples/exceptions/deployments.yaml --no-color --suppress-exceptions
287287
[ "$status" -eq 1 ]
288-
[ "${lines[1]}" = "2 tests, 0 passed, 0 warnings, 1 failure, 1 exception" ]
288+
[ "${lines[1]}" = "2 tests, 0 passed, 0 warnings, 1 failure, 1 exception, 0 exclusions" ]
289289
}
290290

291291
@test "Can combine yaml files" {

output/standard_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func TestStandard(t *testing.T) {
2828
"WARN - foo.yaml - namespace - first warning",
2929
"FAIL - foo.yaml - namespace - first failure",
3030
"",
31-
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions",
31+
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions",
3232
"",
3333
},
3434
},
@@ -46,7 +46,7 @@ func TestStandard(t *testing.T) {
4646
"WARN - - namespace - first warning",
4747
"FAIL - - namespace - first failure",
4848
"",
49-
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions",
49+
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions",
5050
"",
5151
},
5252
},
@@ -66,7 +66,7 @@ func TestStandard(t *testing.T) {
6666
"WARN - foo.yaml - namespace - first warning",
6767
"FAIL - foo.yaml - namespace - first failure",
6868
"",
69-
"3 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 1 skipped",
69+
"3 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions, 1 skipped",
7070
"",
7171
},
7272
},
@@ -85,7 +85,7 @@ func TestStandard(t *testing.T) {
8585
"WARN - - namespace - first warning",
8686
"FAIL - - namespace - first failure",
8787
"",
88-
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 skipped",
88+
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions, 0 skipped",
8989
"",
9090
},
9191
},

0 commit comments

Comments
 (0)