mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-09-04 01:54:36 +00:00
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:
committed by
Ahmet Alp Balkan
parent
df557e4fa7
commit
402cc2c4b9
@@ -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}"
|
||||
}
|
||||
|
Reference in New Issue
Block a user