do not fail on non-existing kubeconfig files

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan
2020-04-16 19:55:34 -07:00
parent 0e50f15393
commit 68b842f39b
7 changed files with 47 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bats
COMMAND="$BATS_TEST_DIRNAME/../kubectx"
COMMAND="${COMMAND:-$BATS_TEST_DIRNAME/../kubectx}"
load common
@@ -29,7 +29,7 @@ load common
run ${COMMAND}
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" = "" ]]
[[ "$output" = "warning: kubeconfig file not found" ]]
}
@test "get one context and list contexts" {