From fcd69a83880db139fcba9728036f23d4c3b6d101 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Thu, 17 Oct 2024 12:52:10 +0800 Subject: [PATCH] Fix: behave: adjust_test_case (#1572) --- test/run-functional-tests | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/run-functional-tests b/test/run-functional-tests index bc906769b..5cfd0205e 100755 --- a/test/run-functional-tests +++ b/test/run-functional-tests @@ -337,10 +337,9 @@ adjust_test_case() { fi index=`echo $item_str|cut -d "." -f 3|tr -d "\r"` if [ "$index" == "default" ];then - ip=`podman container inspect $node -f "{{range .NetworkSettings.Networks}}{{printf \"%s \" .$ip_search_str}}{{end}}"|awk '{print $1}'|tr -d "\r"` - else - ip=`podman container inspect $node -f "{{.NetworkSettings.Networks.${HA_NETWORK_ARRAY[$index]}.$ip_search_str}}"|tr -d "\r"` + index=0 fi + ip=`podman container inspect $node -f "{{.NetworkSettings.Networks.${HA_NETWORK_ARRAY[$index]}.$ip_search_str}}"|tr -d "\r"` item=`echo $item|tr -d "\r"` podman_exec $node_name "sed -i s/$item/$ip/g $2" done