mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-09-18 00:37:45 +00:00
Fix bugs for test pass, update tests
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
@@ -4,16 +4,6 @@ COMMAND="$BATS_TEST_DIRNAME/../kubectx"
|
||||
|
||||
load common
|
||||
|
||||
@test "no kubectl detected" {
|
||||
OLDPATH="$PATH"
|
||||
PATH=/bin
|
||||
run ${COMMAND}
|
||||
echo "$output"
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" = "kubectl is not installed" ]]
|
||||
PATH="$OLDPATH"
|
||||
}
|
||||
|
||||
@test "--help should not fail" {
|
||||
run ${COMMAND} --help
|
||||
echo "$output"
|
||||
@@ -32,7 +22,7 @@ load common
|
||||
run ${COMMAND} -
|
||||
echo "$output"
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" = "error: No previous context found." ]]
|
||||
[[ $output = *"no previous context found" ]]
|
||||
}
|
||||
|
||||
@test "list contexts when no kubeconfig exists" {
|
||||
|
Reference in New Issue
Block a user