From 73f65d7530bb039f1a0984e3e0e01263bdb6cf21 Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Sun, 26 Sep 2021 12:11:42 +0200 Subject: [PATCH] Add acceptance test for HTTPS_PROXY support --- acceptance.bats | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/acceptance.bats b/acceptance.bats index 2f963b0..7958b82 100755 --- a/acceptance.bats +++ b/acceptance.bats @@ -281,3 +281,10 @@ resetCacheFolder() { [ "$status" -eq 0 ] [ "$output" = 'Summary: 2 resources found in 1 file - Valid: 2, Invalid: 0, Errors: 0, Skipped: 0' ] } + +@test "Should support HTTPS_PROXY" { + # This only tests that the HTTPS_PROXY variable is picked up and that it tries to use it + run bash -c "HTTPS_PROXY=127.0.0.1:1234 bin/kubeconform fixtures/valid.yaml" + [ "$status" -eq 1 ] + [[ "$output" == *"proxyconnect tcp: dial tcp 127.0.0.1:1234: connect: connection refused"* ]] +}