X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tests%2Fdcaegen2%2Fprh-testcases%2Fresources%2Fprh_library.robot;h=88d4b5013ca94bc7b40bf4d009dd2f349e27d914;hb=fba99a52e971c0069b51a2bdce0f6cde9302f018;hp=4f64694df54e512f976e0e9948398203dcd02e29;hpb=3b9d65cc124b6fbdcd140466fe36bc09178fe510;p=integration%2Fcsit.git diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 4f64694d..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 @@ -26,32 +28,51 @@ Invalid event processing Set event in DMaaP ${data} ${invalid_notification}= Create invalid notification ${data} ${notification}= Catenate SEPARATOR= \\n |Incorrect json, consumerDmaapModel can not be created: ${invalid_notification} - Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification} + #TODO to fix after CBS merge + #Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification} Valid event processing - [Arguments] ${input_valid__ves_event_in_dmaap} - [Timeout] 30s + [Arguments] ${input_valid__ves_event_in_dmaap} ${input_aai} + [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} ${pnf_name}= Create PNF name ${data} Set PNF name in AAI ${pnf_name} - Set event in DMaaP ${data} + Set PNF content in AAI ${aai_entry_to_be_set} ${expected_event_pnf_ready_in_dpaap}= create pnf ready_notification as pnf ready ${data} - Wait Until Keyword Succeeds 100x 300ms Check PNF_READY notification ${expected_event_pnf_ready_in_dpaap} + #TODO to fix after CBS merge + #Wait Until Keyword Succeeds 10x 300ms Check PNF_READY notification ${expected_event_pnf_ready_in_dpaap} + #Wait Until Keyword Succeeds 10x 5000ms Check PRH log Mandingo Check PRH log [Arguments] ${searched_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} Set PNF name in AAI - [Arguments] ${pnfs_name} + [Arguments] ${pnf_name} + ${headers}= Create Dictionary Accept=application/json Content-Type=text/html + Log AAI url ${AAI_SIMULATOR_SETUP_URL} + Log Http headers ${headers} + Log PNF name ${pnf_name} + ${resp}= Put Request ${aai_setup_session} /set_pnf headers=${headers} data=${pnf_name} + Should Be Equal As Strings ${resp.status_code} 200 + +Set PNF content in AAI + [Arguments] ${aai_pnf_content} ${headers}= Create Dictionary Accept=application/json Content-Type=text/html - ${resp}= Put Request ${aai_setup_session} /set_pnfs headers=${headers} data=${pnfs_name} + Log AAI url ${AAI_SIMULATOR_SETUP_URL} + Log Http headers ${headers} + Log PNF AAI content ${aai_pnf_content} + ${resp}= Put Request ${aai_setup_session} /setup/add_pnf_entry headers=${headers} data=${aai_pnf_content} Should Be Equal As Strings ${resp.status_code} 200 Set event in DMaaP @@ -65,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