change -o template to -o go-template=...
This commit is contained in:
@@ -31,7 +31,7 @@ kube::test::get_object_assert() {
|
||||
local request=$2
|
||||
local expected=$3
|
||||
|
||||
res=$(eval kubectl get "${kube_flags[@]}" $object -o template -t \"$request\")
|
||||
res=$(eval kubectl get "${kube_flags[@]}" $object -o go-template=\"$request\")
|
||||
|
||||
if [[ "$res" =~ ^$expected$ ]]; then
|
||||
echo -n ${green}
|
||||
@@ -56,7 +56,7 @@ kube::test::get_object_jsonpath_assert() {
|
||||
local request=$2
|
||||
local expected=$3
|
||||
|
||||
res=$(eval kubectl get "${kube_flags[@]}" $object -o jsonpath -t \"$request\")
|
||||
res=$(eval kubectl get "${kube_flags[@]}" $object -o jsonpath=\"$request\")
|
||||
|
||||
if [[ "$res" =~ ^$expected$ ]]; then
|
||||
echo -n ${green}
|
||||
|
@@ -163,14 +163,14 @@ runTests() {
|
||||
-s "http://127.0.0.1:${API_PORT}"
|
||||
--match-server-version
|
||||
)
|
||||
[ "$(kubectl get nodes -t '{{ .apiVersion }}' "${kube_flags[@]}")" == "v1" ]
|
||||
[ "$(kubectl get nodes -o go-template='{{ .apiVersion }}' "${kube_flags[@]}")" == "v1" ]
|
||||
else
|
||||
kube_flags=(
|
||||
-s "http://127.0.0.1:${API_PORT}"
|
||||
--match-server-version
|
||||
--api-version="${version}"
|
||||
)
|
||||
[ "$(kubectl get nodes -t '{{ .apiVersion }}' "${kube_flags[@]}")" == "${version}" ]
|
||||
[ "$(kubectl get nodes -o go-template='{{ .apiVersion }}' "${kube_flags[@]}")" == "${version}" ]
|
||||
fi
|
||||
id_field=".metadata.name"
|
||||
labels_field=".metadata.labels"
|
||||
|
Reference in New Issue
Block a user