mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Fix run_kubectl_sort_by_tests
This commit is contained in:
parent
cb17a2b6a6
commit
1678f42970
@ -260,14 +260,10 @@ kube::test::describe_resource_events_assert() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Compare sort-by resource name output with expected order specify in the last parameter
|
||||
# Compare sort-by resource name output (first column, skipping first line) with expected order specify in the last parameter
|
||||
kube::test::if_sort_by_has_correct_order() {
|
||||
IFS=" " read -r -a array <<< "$(echo "$1" |awk '{if(NR!=1) print $1}')"
|
||||
local var
|
||||
for i in "${array[@]}"; do
|
||||
var+="${i}:"
|
||||
done
|
||||
|
||||
var="$(echo "$1" | awk '{if(NR!=1) print $1}' | tr '\n' ':')"
|
||||
kube::test::if_has_string "${var}" "${@:$#}"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user