As a paas-templates user
In order to list testkube tests per kustomizations while testkube is installed in a single namespace along with all tests
I need a tk alias which injects the --label kusto=$(kubectl ns -c) flag into the testkube commands that support the --label flag : get
$ tk
Usage:
testkube [flags]
testkube [command]
Available Commands:
[...]
get Get resources
Workaround
FIXME: this currently breaks the testkube completion, not yet clear why
# Injects transparently a label argument with the current namespace
# Original Usage:
# testkube [flags]
# testkube [command]
function ltk() {
local command="$1"
shift
local insertFlags=""
case "${command}" in
get)
insertFlags="--label kusto=$(kubectl ns -c)"
;;
*)
#don't assign the flag
;;
esac
testkube "$command" ${insertFlags} $*
}
alias testkube=ltk
Expected
As a paas-templates user In order to list testkube tests per kustomizations while testkube is installed in a single namespace along with all tests I need a tk alias which injects the
--label kusto=$(kubectl ns -c)
flag into the testkube commands that support the --label flag : getWorkaround
FIXME: this currently breaks the testkube completion, not yet clear why