add cli tests for kubens (#117)

* split bats test invocation by executable

* add more cli tests for kubens

* clean up kubens tests

* small cleanup to kubens tests
This commit is contained in:
Kumbirai Tanekha
2019-01-03 18:06:13 +00:00
committed by Ahmet Alp Balkan
parent df557e4fa7
commit 402cc2c4b9
5 changed files with 125 additions and 13 deletions

View File

@@ -17,6 +17,14 @@ use_config() {
# wrappers around "kubectl config" command
get_context() {
kubectl config current-context
get_namespace() {
kubectl config view -o=jsonpath="{.contexts[?(@.name==\"$(get_context)\")].context.namespace}"
}
get_context() {
kubectl config current-context
}
switch_context() {
kubectl config use-context "${1}"
}