From 1cfbacd92c38c33151758b9ec8f94c599e5f24d7 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sat, 2 Jan 2021 14:20:54 +0100 Subject: [PATCH] Add acceptance tests for TAP output --- acceptance.bats | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/acceptance.bats b/acceptance.bats index d995fe4..196bd46 100755 --- a/acceptance.bats +++ b/acceptance.bats @@ -216,3 +216,11 @@ [ "$status" -eq 1 ] [ "$output" = "failed opening cache folder cache_does_not_exist: stat cache_does_not_exist: no such file or directory" ] } + +@test "Produces correct TAP output" { + run bin/kubeconform -output tap fixtures/valid.yaml + [ "$status" -eq 0 ] + [ "${lines[0]}" == 'TAP version 13' ] + [ "${lines[1]}" == 'ok 1 - fixtures/valid.yaml (ReplicationController)' ] + [ "${lines[2]}" == '1..1' ] +}