-
Notifications
You must be signed in to change notification settings - Fork 46
/
acceptance.bats
25 lines (21 loc) · 823 Bytes
/
acceptance.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bats
@test "[DOC] Generated documentation matches example documentation" {
run ./build/konstraint doc examples --output examples/policies.md
[ "$status" -eq 0 ]
git diff --quiet -- examples/policies.md
}
@test "[DOC] Generated documentation without Rego matches example documentation" {
run ./build/konstraint doc --no-rego examples --output examples/policies-no-rego.md
[ "$status" -eq 0 ]
git diff --quiet -- examples/policies-no-rego.md
}
@test "[CREATE] Creating constraints and templates matches examples" {
run ./build/konstraint create examples
[ "$status" -eq 0 ]
git diff --quiet -- examples/
}
@test "[CREATE] Creating constraints using --output matches expected output" {
run ./build/konstraint create test --output test
[ "$status" -eq 0 ]
git diff --quiet -- test/
}