-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moe testdata to examples, add add additional tests
- Loading branch information
Showing
6 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#!/usr/bin/env bats | ||
|
||
@test "Fail when testing an invalid service" { | ||
run conftest testdata/service.yaml | ||
@test "Not fail when testing a service with a warning" { | ||
run conftest -p examples/kubernetes/policy examples/kubernetes/service.yaml | ||
[ "$status" -eq 0 ] | ||
} | ||
|
||
@test "Fail when testing a deployment with root containers" { | ||
run conftest -p examples/kubernetes/policy examples/kubernetes/deployment.yaml | ||
[ "$status" -eq 1 ] | ||
} | ||
|
||
@test "Fail when testing a service with warnings" { | ||
run conftest --fail-on-warn -p examples/kubernetes/policy examples/kubernetes/service.yaml | ||
[ "$status" -eq 1 ] | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.