From fba99a52e971c0069b51a2bdce0f6cde9302f018 Mon Sep 17 00:00:00 2001 From: Marcin Migdal Date: Mon, 15 Apr 2019 14:36:45 +0200 Subject: Attempt to check CSIT Wait for CBS startup Change-Id: I0cae12fdfeed7a25593d98e66b7e2353b3efff29 Issue-ID: INT-989 Signed-off-by: Marcin Migdal --- tests/dcaegen2/prh-testcases/prh_tests.robot | 1 + .../dcaegen2/prh-testcases/resources/docker-compose.yml | 5 ++++- .../dcaegen2/prh-testcases/resources/prh_library.robot | 17 ++++++++++++++--- tests/dcaegen2/prh-testcases/ssl_prh_tests.robot | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) (limited to 'tests') 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 -- cgit 1.2.3-korg