-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added testing.md to explain how to write a test (#10)
- Loading branch information
1 parent
6a89568
commit fd47b01
Showing
2 changed files
with
11 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# testing | ||
This repo uses as a combination of [bats](https://github.com/bats-core/bats-core) and [conftest](https://github.com/open-policy-agent/conftest) | ||
to validate the rego policies. | ||
|
||
## How do i write a test? | ||
Each test is expected to have a directory under [_test](_test) which contains the test input data; typically a yaml file | ||
containing a OCP Template or k8s List. | ||
|
||
The tests are executed by [_test/tests.bats](_test/tests.bats). The test should validate each expected bats output and always | ||
end with the expected success line. |