BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Library OperatingSystem |
| 3 | Library RequestsLibrary |
| 4 | Library Process |
| 5 | |
| 6 | *** Variables *** |
| 7 | |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 8 | ${CLI_MRSIM_CTR_REQUESTS} curl --connect-timeout 10 -X GET http://${SIM_IP}:2222/ctr_requests |
| 9 | ${CLI_MRSIM_CTR_RESPONSES} curl --connect-timeout 10 -X GET http://${SIM_IP}:2222/ctr_responses |
| 10 | ${CLI_MRSIM_CTR_FILES} curl --connect-timeout 10 -X GET http://${SIM_IP}:2222/ctr_unique_files |
| 11 | |
| 12 | ${CLI_DRSIM_CTR_QUERY_NOT_PUBLISHED} curl --connect-timeout 10 -X GET http://${SIM_IP}:3906/ctr_publish_query_not_published |
| 13 | ${CLI_DRSIM_CTR_PUBLISHED_FILES} curl --connect-timeout 10 -X GET http://${SIM_IP}:3906/ctr_published_files |
| 14 | ${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} curl --connect-timeout 10 -X GET http://${SIM_IP}:3908/dwl_volume |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 15 | |
Piotr Marcinkiewicz | 532cd63 | 2021-09-03 15:07:42 +0200 | [diff] [blame] | 16 | ${DFC_CONFIG_VOLUME_FILE} ${SIMGROUP_ROOT}/dfc_config_volume/application_config.yaml |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 17 | *** Keywords *** |
| 18 | |
| 19 | MR Sim Emitted Files Equal |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 20 | [Documentation] Verify that the number of emitted unique files are equal to a target value |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 21 | [Arguments] ${target_ctr_value} |
| 22 | ${resp}= Run Process ${CLI_MRSIM_CTR_FILES} shell=yes |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 23 | Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} |
| 24 | |
| 25 | DR Sim Query Not Published Equal |
| 26 | [Documentation] Verify that the number responsed of queries of not published files are equal to a target value |
| 27 | [Arguments] ${target_ctr_value} |
| 28 | ${resp}= Run Process ${CLI_DRSIM_CTR_QUERY_NOT_PUBLISHED} shell=yes |
| 29 | Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} |
| 30 | |
| 31 | DR Sim Published Files Equal |
| 32 | [Documentation] Verify that the number published files are equal to a target value |
| 33 | [Arguments] ${target_ctr_value} |
| 34 | ${resp}= Run Process ${CLI_DRSIM_CTR_PUBLISHED_FILES} shell=yes |
| 35 | Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} |
| 36 | |
| 37 | DR Redir Sim Downloaded Volume Equal |
| 38 | [Documentation] Verify that the size of the downloaded data volume is equal to a target value |
| 39 | [Arguments] ${target_ctr_value} |
| 40 | ${resp}= Run Process ${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} shell=yes |
Remigiusz Janeczek | c45b798 | 2020-07-24 14:18:42 +0200 | [diff] [blame] | 41 | Should Be Equal As Strings ${resp.stdout} ${target_ctr_value} |
| 42 | |
| 43 | Start DFC |
| 44 | [Documentation] Start DFC container |
| 45 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:SIMGROUP_ROOT=${SIMGROUP_ROOT} |
| 46 | Log To Console Dfc-start: |
| 47 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
Remigiusz Janeczek | 9055367 | 2020-07-14 10:08:01 +0200 | [diff] [blame] | 48 | |
Piotr Marcinkiewicz | 532cd63 | 2021-09-03 15:07:42 +0200 | [diff] [blame] | 49 | Set DFC config |
| 50 | [Documentation] Set DFC configuration |
| 51 | [Arguments] ${dfc_config_file} |
| 52 | Copy File ${dfc_config_file} ${DFC_CONFIG_VOLUME_FILE} |
| 53 | ${dfc_config_file_content}= Get File ${DFC_CONFIG_VOLUME_FILE} |
| 54 | Log To Console APP configuration: |
| 55 | Log To Console ${dfc_config_file_content} |
Remigiusz Janeczek | 9055367 | 2020-07-14 10:08:01 +0200 | [diff] [blame] | 56 | |
| 57 | Test Teardown |
| 58 | [Documentation] Cleanup containers |
| 59 | ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 60 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 61 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
| 62 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 63 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT |
| 64 | Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |