diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/utils/tacker-setup.sh | 4 | ||||
-rw-r--r-- | tests/vHello_Tacker.sh | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/utils/tacker-setup.sh b/tests/utils/tacker-setup.sh index 5cad2e4..8b915ed 100644 --- a/tests/utils/tacker-setup.sh +++ b/tests/utils/tacker-setup.sh @@ -107,6 +107,10 @@ function setup_test_environment () { neutron router-create vnf_mgmt_router echo "$0: Add router interface for vnf_mgmt network" neutron router-interface-add vnf_mgmt_router subnet=vnf_mgmt + neutron router-create vnf_private_router + echo "$0: Create router gateway for vnf_private network" + get_external_net + neutron router-gateway-set vnf_mgmt_router $EXTERNAL_NETWORK_NAME fi echo "Create private network" diff --git a/tests/vHello_Tacker.sh b/tests/vHello_Tacker.sh index 9232969..1dd01ba 100644 --- a/tests/vHello_Tacker.sh +++ b/tests/vHello_Tacker.sh @@ -131,8 +131,12 @@ nohup sudo python3 -m http.server 80 > /dev/null 2>&1 & exit EOF + echo "$0: wait 10 seconds for vHello server to startup" + sleep 10 + echo "$0: verify vHello server is running" - if [[ $(curl $SERVER_URL | grep -c "Hello, World!") != 1 ]]; then fail; fi + apt-get install -y curl + if [[ $(curl $SERVER_URL | grep -c "Hello World") == 0 ]]; then fail; fi pass } @@ -203,6 +207,7 @@ if [[ "$2" == "setup" ]]; then # Using pre-key-injected image for now, vHello.pem as provided in the blueprint wget http://bkaj.net/opnfv/xenial-server-cloudimg-amd64-disk1.img cp blueprints/tosca-vnfd-hello-world-tacker/vHello.pem /tmp/tacker + chmod 600 /tmp/tacker/vHello.pem echo "$0: Setup image_id" image_id=$(openstack image list | awk "/ models-xenial-server / { print \$2 }" | tr -dc \n) |