X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=tests%2Fdcaegen2-collectors-datafile%2Fresources%2Fcommon-keywords.robot;h=b872806852cc5be889668c12505271465d82d800;hb=532cd635c7ad5561657b2a64d423aad611969b66;hp=a113537579f8c3a817788b30e92077a5d3b534ea;hpb=d3104ef51614e203cb87b78ef254fb106ab467bd;p=integration%2Fcsit.git diff --git a/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot b/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot index a1135375..b8728068 100644 --- a/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot +++ b/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot @@ -5,14 +5,60 @@ Library Process *** Variables *** -${CLI_MRSIM_CTR_REQUESTS} curl http://${SIM_IP}:2222/ctr_requests -${CLI_MRSIM_CTR_RESPONSES} curl http://${SIM_IP}:2222/ctr_responses -${CLI_MRSIM_CTR_FILES} curl http://${SIM_IP}:2222/ctr_unique_files +${CLI_MRSIM_CTR_REQUESTS} curl --connect-timeout 10 -X GET http://${SIM_IP}:2222/ctr_requests +${CLI_MRSIM_CTR_RESPONSES} curl --connect-timeout 10 -X GET http://${SIM_IP}:2222/ctr_responses +${CLI_MRSIM_CTR_FILES} curl --connect-timeout 10 -X GET http://${SIM_IP}:2222/ctr_unique_files +${CLI_DRSIM_CTR_QUERY_NOT_PUBLISHED} curl --connect-timeout 10 -X GET http://${SIM_IP}:3906/ctr_publish_query_not_published +${CLI_DRSIM_CTR_PUBLISHED_FILES} curl --connect-timeout 10 -X GET http://${SIM_IP}:3906/ctr_published_files +${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} curl --connect-timeout 10 -X GET http://${SIM_IP}:3908/dwl_volume + +${DFC_CONFIG_VOLUME_FILE} ${SIMGROUP_ROOT}/dfc_config_volume/application_config.yaml *** Keywords *** MR Sim Emitted Files Equal - [Documentation] Verify that the number of emitted unique files are equal to a target value + [Documentation] Verify that the number of emitted unique files are equal to a target value [Arguments] ${target_ctr_value} ${resp}= Run Process ${CLI_MRSIM_CTR_FILES} shell=yes - Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} \ No newline at end of file + Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} + +DR Sim Query Not Published Equal + [Documentation] Verify that the number responsed of queries of not published files are equal to a target value + [Arguments] ${target_ctr_value} + ${resp}= Run Process ${CLI_DRSIM_CTR_QUERY_NOT_PUBLISHED} shell=yes + Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} + +DR Sim Published Files Equal + [Documentation] Verify that the number published files are equal to a target value + [Arguments] ${target_ctr_value} + ${resp}= Run Process ${CLI_DRSIM_CTR_PUBLISHED_FILES} shell=yes + Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} + +DR Redir Sim Downloaded Volume Equal + [Documentation] Verify that the size of the downloaded data volume is equal to a target value + [Arguments] ${target_ctr_value} + ${resp}= Run Process ${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} shell=yes + Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} + +Start DFC + [Documentation] Start DFC container + ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:SIMGROUP_ROOT=${SIMGROUP_ROOT} + Log To Console Dfc-start: + Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} + +Set DFC config + [Documentation] Set DFC configuration + [Arguments] ${dfc_config_file} + Copy File ${dfc_config_file} ${DFC_CONFIG_VOLUME_FILE} + ${dfc_config_file_content}= Get File ${DFC_CONFIG_VOLUME_FILE} + Log To Console APP configuration: + Log To Console ${dfc_config_file_content} + +Test Teardown + [Documentation] Cleanup containers + ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh + Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} + ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh + Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} + ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT + Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}