mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-18 17:37:03 +00:00
Add test for parsing incorrect flags
This commit is contained in:
parent
27a3ddeca2
commit
3e44fa9105
1 changed files with 6 additions and 0 deletions
|
|
@ -11,6 +11,12 @@ resetCacheFolder() {
|
|||
[ "${lines[0]}" == 'Usage: bin/kubeconform [OPTION]... [FILE OR FOLDER]...' ]
|
||||
}
|
||||
|
||||
@test "Fail and display help when using an incorrect flag" {
|
||||
run bin/kubeconform -xyz
|
||||
[ "$status" -eq 1 ]
|
||||
[ "${lines[0]}" == 'flag provided but not defined: -xyz' ]
|
||||
}
|
||||
|
||||
@test "Pass when parsing a valid Kubernetes config YAML file" {
|
||||
run bin/kubeconform -summary fixtures/valid.yaml
|
||||
[ "$status" -eq 0 ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue