diff --git a/tests/eclient/testdata/nw_switch.txt b/tests/eclient/testdata/nw_switch.txt index e33c6d91d..5667cb813 100644 --- a/tests/eclient/testdata/nw_switch.txt +++ b/tests/eclient/testdata/nw_switch.txt @@ -35,9 +35,6 @@ message 'Waiting of running' test eden.app.test -test.v -timewait 20m RUNNING ping1 ping2 pong message 'Getting "pong" IP' -exec sleep 5 -eden pod ps -cp stdout pod_ps exec bash pong_ip.sh message 'Checking accessibility' @@ -55,9 +52,6 @@ eden pod modify pong --networks n2 test eden.app.test -test.v -timewait 15m RUNNING pong message 'Getting new "pong" IP' -exec sleep 5 -eden pod ps -cp stdout pod_ps exec bash pong_ip.sh exec -t 5m bash wait_ssh.sh 2223 2224 @@ -73,9 +67,6 @@ eden pod modify pong --networks n1 test eden.app.test -test.v -timewait 15m RUNNING pong message 'Getting new "pong" IP' -exec sleep 5 -eden pod ps -cp stdout pod_ps exec bash pong_ip.sh message 'Testing of 1st network again' @@ -120,8 +111,22 @@ do done -- pong_ip.sh -- -echo export PONG_IP=$(grep '^ *pong\s' pod_ps | cut -f 4) > env -cat env +EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}} + +for i in `seq 10` +do + sleep 10 + PONG_IP=$($EDEN pod ps | grep '^ *pong\s' | cut -f 4) + if [ $PONG_IP != "-" ]; then + echo export PONG_IP=$PONG_IP > env + cat env + exit 0 + fi +done + +$EDEN pod ps +echo "failed to get PONG IP" +exit 1 -- ping.sh -- EDEN={{EdenConfig "eden.root"}}/{{EdenConfig "eden.bin-dist"}}/{{EdenConfig "eden.eden-bin"}}