Skip to content

Commit

Permalink
Update tests to accomodate new output
Browse files Browse the repository at this point in the history
Signed-off-by: Hamish Hutchings <[email protected]>
  • Loading branch information
moredhel authored and Hamish Hutchings committed Jun 30, 2021
1 parent 2251f80 commit 373e658
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions acceptance.bats
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
@test "Test command works with nested namespaces" {
run ./conftest test --namespace main.gke -p examples/hcl1/policy/ examples/hcl1/gke.tf --no-color
[ "$status" -eq 1 ]
[ "${lines[1]}" = "1 test, 0 passed, 0 warnings, 1 failure, 0 exceptions" ]
[ "${lines[1]}" = "1 test, 0 passed, 0 warnings, 1 failure, 0 exceptions, 0 exclusions" ]
}

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

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

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

@test "Can combine yaml files" {
Expand Down
8 changes: 4 additions & 4 deletions output/standard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestStandard(t *testing.T) {
"WARN - foo.yaml - namespace - first warning",
"FAIL - foo.yaml - namespace - first failure",
"",
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions",
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions",
"",
},
},
Expand All @@ -46,7 +46,7 @@ func TestStandard(t *testing.T) {
"WARN - - namespace - first warning",
"FAIL - - namespace - first failure",
"",
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions",
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions",
"",
},
},
Expand All @@ -66,7 +66,7 @@ func TestStandard(t *testing.T) {
"WARN - foo.yaml - namespace - first warning",
"FAIL - foo.yaml - namespace - first failure",
"",
"3 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 1 skipped",
"3 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions, 1 skipped",
"",
},
},
Expand All @@ -85,7 +85,7 @@ func TestStandard(t *testing.T) {
"WARN - - namespace - first warning",
"FAIL - - namespace - first failure",
"",
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 skipped",
"2 tests, 0 passed, 1 warning, 1 failure, 0 exceptions, 0 exclusions, 0 skipped",
"",
},
},
Expand Down

0 comments on commit 373e658

Please sign in to comment.