kubens add a short-circuit to bypass API call for tests

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan
2020-04-29 12:52:08 -07:00
parent 04689f571e
commit 5348d7aa7e
2 changed files with 10 additions and 0 deletions

View File

@@ -1,8 +1,13 @@
#!/usr/bin/env bats
COMMAND="${COMMAND:-$BATS_TEST_DIRNAME/../kubens}"
# TODO(ahmetb) remove this after bash implementations are deleted
export KUBECTL="$BATS_TEST_DIRNAME/../test/mock-kubectl"
# short-circuit namespace querying in kubens go implementation
export _MOCK_NAMESPACES=1
load common
@test "--help should not fail" {