From a038f7d9043b567321242b0d93d6d72adcdb96ff Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Fri, 7 Dec 2018 13:21:33 +0200 Subject: [PATCH] tests: use the first IP address if more than 1 retruned from OpenStack (cherry picked from commit 883a9594425e1ee7ac99f2238f08f317a131acd4) --- tests/cli/test_build_and_deploy_openstack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cli/test_build_and_deploy_openstack.sh b/tests/cli/test_build_and_deploy_openstack.sh index 67777874..d09b8c84 100755 --- a/tests/cli/test_build_and_deploy_openstack.sh +++ b/tests/cli/test_build_and_deploy_openstack.sh @@ -102,7 +102,7 @@ __EOF__ rlAssert0 "VM started successfully" $? rlLogInfo "$response" - IP_ADDRESS=`echo "$response" | grep '"OS-EXT-IPS:type": "floating"' -A1 | grep '"addr":' | cut -f4 -d'"'` + IP_ADDRESS=`echo "$response" | grep '"OS-EXT-IPS:type": "floating"' -A1| grep '"addr":' | cut -f4 -d'"' | head -n 1` rlLogInfo "Running instance IP_ADDRESS=$IP_ADDRESS" rlLogInfo "Waiting 60sec for instance to initialize ..."