From 472100550c3ecd9712150c848b9f05f742440b73 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sun, 18 Oct 2020 14:07:47 +0200 Subject: [PATCH] acceptnace tests for custom registry --- acceptance.bats | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/acceptance.bats b/acceptance.bats index ad39c42..c460b0d 100755 --- a/acceptance.bats +++ b/acceptance.bats @@ -105,3 +105,13 @@ run bin/kubeconform --registry 'https://kubernetesjsonschema.dev/{{ .NormalizedVersion }}-standalone{{ .StrictSuffix }}/{{ .ResourceKind }}{{ .KindSuffix }}.json' fixtures/valid.yaml [ "$status" -eq 0 ] } + +@test "Fail when using an invalid HTTP --registry" { + run bin/kubeconform --registry 'http://foo' fixtures/valid.yaml + [ "$status" -eq 1 ] +} + +@test "Fail when using an invalid non-HTTP --registry" { + run bin/kubeconform --registry 'foo' fixtures/valid.yaml + [ "$status" -eq 1 ] +}