diff options
-rw-r--r-- | plans/dcaegen2/prh-testsuites/setup.sh | 6 | ||||
-rwxr-xr-x | plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh | 12 | ||||
-rwxr-xr-x | plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh | 1 | ||||
-rwxr-xr-x | plans/vfc-gvnfm-vnfres/sanity-check/setup.sh | 12 | ||||
-rwxr-xr-x | plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh | 1 | ||||
-rw-r--r-- | tests/dcaegen2/prh-testcases/prh_tests.robot | 1 | ||||
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/docker-compose.yml | 5 | ||||
-rw-r--r-- | tests/dcaegen2/prh-testcases/resources/prh_library.robot | 17 | ||||
-rw-r--r-- | tests/dcaegen2/prh-testcases/ssl_prh_tests.robot | 1 | ||||
-rw-r--r-- | tests/vfc/gvnfm-vnflcm/test.robot | 11 |
10 files changed, 60 insertions, 7 deletions
diff --git a/plans/dcaegen2/prh-testsuites/setup.sh b/plans/dcaegen2/prh-testsuites/setup.sh index 5ce3d0e6..46871fd8 100644 --- a/plans/dcaegen2/prh-testsuites/setup.sh +++ b/plans/dcaegen2/prh-testsuites/setup.sh @@ -15,6 +15,10 @@ cd ${WORKSPACE}/tests/dcaegen2/prh-testcases/resources/ pip uninstall -y docker-py pip uninstall -y docker pip install -U docker + +set -e + +docker login -u docker -p docker https://nexus3.onap.org:10001 docker-compose up -d --build # Extract docker images IPs @@ -47,4 +51,4 @@ wait_for_service_init localhost:8100/heartbeat wait_for_service_init localhost:8200/heartbeat # #Pass any variables required by Robot test suites in ROBOT_VARIABLES -ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335" +ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500"
\ No newline at end of file diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh index 0c4efcc1..28be1842 100755 --- a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh +++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh @@ -52,6 +52,18 @@ done # wait for container initalization echo sleep 60 sleep 60 + +# start vfc-vnflcm +docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm +VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm` + +# Wait for initialization +for i in {1..10}; do + curl -sS -m 1 ${VNFLCM_IP}:8801 && break + echo sleep $i + sleep $i +done + # start vfc-vnfres docker run -d --name vfc-vnfmgr -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnfmgr VNFMGR_IP=`get-instance-ip.sh vfc-vnfmgr` diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh index 09db55b5..8ca66766 100755 --- a/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh +++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh @@ -20,4 +20,5 @@ kill-instance.sh msb_internal_apigateway kill-instance.sh msb_discovery kill-instance.sh msb_consul kill-instance.sh vfc-db +kill-instance.sh vfc-vnflcm kill-instance.sh vfc-vnfres diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh index a0ea986d..34be3c21 100755 --- a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh +++ b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh @@ -52,6 +52,18 @@ done # wait for container initalization echo sleep 60 sleep 60 + +# start vfc-vnflcm +docker run -d --name vfc-vnflcm -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnflcm +VNFLCM_IP=`get-instance-ip.sh vfc-vnflcm` + +# Wait for initialization +for i in {1..10}; do + curl -sS -m 1 ${VNFLCM_IP}:8801 && break + echo sleep $i + sleep $i +done + # start vfc-vnfres docker run -d --name vfc-vnfres -e MSB_ADDR=${MSB_IAG_IP}:80 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/vnfres VNFRES_IP=`get-instance-ip.sh vfc-vnfres` diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh b/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh index 09db55b5..8ca66766 100755 --- a/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh +++ b/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh @@ -20,4 +20,5 @@ kill-instance.sh msb_internal_apigateway kill-instance.sh msb_discovery kill-instance.sh msb_consul kill-instance.sh vfc-db +kill-instance.sh vfc-vnflcm kill-instance.sh vfc-vnfres diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot index 1e9802c5..3de7e91a 100644 --- a/tests/dcaegen2/prh-testcases/prh_tests.robot +++ b/tests/dcaegen2/prh-testcases/prh_tests.robot @@ -11,6 +11,7 @@ Resource ../../common.robot *** Variables *** ${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP} ${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP} +${CONSUL_SETUP_URL} http://${CONSUL_SETUP} ${VES_EVENT_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json ${AAI_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/aai-pnf-registration-simple.json diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml index aca9d6ae..1b0c4702 100644 --- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml +++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml @@ -158,4 +158,7 @@ services: - CONSUL_HOST depends_on: - consul-cfg - container_name: cbs
\ No newline at end of file + container_name: cbs + + + diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 9b7e7830..88d4b501 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -14,6 +14,8 @@ Create sessions Set Suite Variable ${dmaap_setup_session} dmaap_setup_session Create Session aai_setup_session ${AAI_SIMULATOR_SETUP_URL} Set Suite Variable ${aai_setup_session} aai_setup_session + Create Session consul_setup_session ${CONSUL_SETUP_URL} + Set Suite Variable ${consul_setup_session} consul_setup_session Reset Simulators Reset AAI simulator @@ -31,7 +33,9 @@ Invalid event processing Valid event processing [Arguments] ${input_valid__ves_event_in_dmaap} ${input_aai} - [Timeout] 30s + [Timeout] 100s + Sleep 50s + Wait Until Keyword Succeeds 10x 3000ms Check CBS ready ${data}= Get Data From File ${input_valid__ves_event_in_dmaap} ${aai_entry_to_be_set}= Get Data From File ${input_aai} Set event in DMaaP ${data} @@ -48,7 +52,7 @@ Check PRH log ${status}= Check for log ${searched_log} Should Be Equal As Strings ${status} True -Check PNF_READY notification +Check PNF_READY nojson_objectification [Arguments] ${expected_event_pnf_ready_in_dpaap} ${resp}= Get Request ${dmaap_setup_session} /events/pnfReady headers=${suite_headers} Should Be Equal ${resp.text} ${expected_event_pnf_ready_in_dpaap} @@ -82,4 +86,11 @@ Reset AAI simulator Reset DMaaP simulator ${resp}= Post Request ${dmaap_setup_session} /reset - Should Be Equal As Strings ${resp.status_code} 200
\ No newline at end of file + Should Be Equal As Strings ${resp.status_code} 200 + + +Check CBS ready + ${resp}= Get Request ${consul_setup_session} /v1/catalog/service/cbs + Should Be Equal As Strings ${resp.status_code} 200 + #${json_as_str} Convert JSON To String ${resp.content} + #Log CBS ${json_as_str}
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot b/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot index be260bd6..dd193318 100644 --- a/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot +++ b/tests/dcaegen2/prh-testcases/ssl_prh_tests.robot @@ -11,6 +11,7 @@ Resource ../../common.robot *** Variables *** ${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP} ${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP} +${CONSUL_SETUP_URL} http://${CONSUL_SETUP} ${VES_EVENT_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/ves-event-pnf-registration-simple.json ${AAI_PNF_REGISTRATION_SIMPLE} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets/json_events/aai-pnf-registration-simple.json diff --git a/tests/vfc/gvnfm-vnflcm/test.robot b/tests/vfc/gvnfm-vnflcm/test.robot index 97463ac1..c2c6a9c0 100644 --- a/tests/vfc/gvnfm-vnflcm/test.robot +++ b/tests/vfc/gvnfm-vnflcm/test.robot @@ -9,8 +9,7 @@ Library HttpLibrary.HTTP *** Variables *** @{return_ok_list}= 200 201 202 204 ${queryswagger_url} /api/vnflcm/v1/swagger.json -${create_vnf_url} /api/vnflcm/v1/vnf_instances -${delete_vnf_url} /api/vnflcm/v1/vnf_instances +${query_vnfs_url} /api/vnflcm/v1/vnf_instances ${healthcheck_url} /api/vnflcm/v1/health_check #json files @@ -41,3 +40,11 @@ VnflcmHealthCheckTest ${response_json} json.loads ${resp.content} ${health_status}= Convert To String ${response_json['status']} Should Be Equal ${health_status} active + +VnflcmQueryVnfsTest + [Documentation] check health for vnflcm by MSB + ${headers} Create Dictionary Content-Type=application/json Accept=application/json + Create Session web_session http://${VNFLCM_IP}:8801 headers=${headers} + ${resp}= Get Request web_session ${query_vnfs_url} + ${responese_code}= Convert To String ${resp.status_code} + List Should Contain Value ${return_ok_list} ${responese_code} |