From 456f25547878a9dce51ba18e1dc04b6e26636a08 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sat, 31 Oct 2020 14:13:50 +0100 Subject: [PATCH] Add more acceptance tests --- acceptance.bats | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/acceptance.bats b/acceptance.bats index 081788f..4e93b54 100755 --- a/acceptance.bats +++ b/acceptance.bats @@ -18,6 +18,12 @@ [ "$output" = "fixtures/int_or_string.yaml - Service heapster is valid" ] } +@test "Pass when parsing a valid Kubernetes config JSON file" { + run bin/kubeconform -kubernetes-version 1.17.1 -summary fixtures/valid.json + [ "$status" -eq 0 ] + [ "$output" = "Summary: 1 resource found in 1 file - Valid: 1, Invalid: 0, Errors: 0 Skipped: 0" ] +} + @test "Pass when parsing a valid Kubernetes config YAML file with generate name" { run bin/kubeconform -verbose fixtures/generate_name.yaml [ "$status" -eq 0 ] @@ -36,6 +42,12 @@ [ "$output" = "fixtures/null_string.yaml - Service frontend is valid" ] } +@test "Pass when parsing a valid Kubernetes config file with null strings" { + run bin/kubeconform -summary fixtures/null_string.yaml + [ "$status" -eq 0 ] + [ "$output" = "Summary: 1 resource found in 1 file - Valid: 1, Invalid: 0, Errors: 0 Skipped: 0" ] +} + @test "Pass when parsing a multi-document config file" { run bin/kubeconform -summary fixtures/multi_valid.yaml [ "$status" -eq 0 ]