From 42949e20b259bb19d77cef82bfc5d5671a67209a Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sat, 31 Oct 2020 13:26:29 +0100 Subject: [PATCH] Add acceptance tests to validate openshift behaviour --- acceptance.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/acceptance.bats b/acceptance.bats index d8a8b0d..a206bbc 100755 --- a/acceptance.bats +++ b/acceptance.bats @@ -115,3 +115,13 @@ run bin/kubeconform -schema-location 'foo' fixtures/valid.yaml [ "$status" -eq 1 ] } + +@test "Pass with a valid input when validating against openshift manifests" { + run bin/kubeconform -kubernetes-version 3.8.0 -schema-location 'https://raw.githubusercontent.com/garethr/openshift-json-schema/master/{{ .NormalizedVersion }}-standalone{{ .StrictSuffix }}/{{ .ResourceKind }}.json' -summary fixtures/valid.yaml + [ "$status" -eq 0 ] +} + +@test "Fail with an invalid input when validating against openshift manifests" { + run bin/kubeconform -kubernetes-version 3.8.0 -schema-location 'https://raw.githubusercontent.com/garethr/openshift-json-schema/master/{{ .NormalizedVersion }}-standalone{{ .StrictSuffix }}/{{ .ResourceKind }}.json' -summary fixtures/invalid.yaml + [ "$status" -eq 1 ] +} \ No newline at end of file