blob: c425fe2a76b9a156a8ce3d9a504f05caa2a22a94 [file] [log] [blame]
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00001*** Settings ***
2Library OperatingSystem
3Library RequestsLibrary
4Library Process
5
6*** Variables ***
7
BjornMagnussonXA90b09742019-04-16 12:10:40 +00008${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
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000015
16*** Keywords ***
17
18MR Sim Emitted Files Equal
BjornMagnussonXA90b09742019-04-16 12:10:40 +000019 [Documentation] Verify that the number of emitted unique files are equal to a target value
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000020 [Arguments] ${target_ctr_value}
21 ${resp}= Run Process ${CLI_MRSIM_CTR_FILES} shell=yes
BjornMagnussonXA90b09742019-04-16 12:10:40 +000022 Should Be Equal As Strings ${resp.stdout} ${target_ctr_value}
23
24DR Sim Query Not Published Equal
25 [Documentation] Verify that the number responsed of queries of not published files are equal to a target value
26 [Arguments] ${target_ctr_value}
27 ${resp}= Run Process ${CLI_DRSIM_CTR_QUERY_NOT_PUBLISHED} shell=yes
28 Should Be Equal As Strings ${resp.stdout} ${target_ctr_value}
29
30DR Sim Published Files Equal
31 [Documentation] Verify that the number published files are equal to a target value
32 [Arguments] ${target_ctr_value}
33 ${resp}= Run Process ${CLI_DRSIM_CTR_PUBLISHED_FILES} shell=yes
34 Should Be Equal As Strings ${resp.stdout} ${target_ctr_value}
35
36DR Redir Sim Downloaded Volume Equal
37 [Documentation] Verify that the size of the downloaded data volume is equal to a target value
38 [Arguments] ${target_ctr_value}
39 ${resp}= Run Process ${CLI_DR_REDIR_SIM_DOWNLOADED_VOLUME} shell=yes
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020040 Should Be Equal As Strings ${resp.stdout} ${target_ctr_value}
41
42Start DFC
43 [Documentation] Start DFC container
44 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} env:SIMGROUP_ROOT=${SIMGROUP_ROOT}
45 Log To Console Dfc-start:
46 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
Remigiusz Janeczek90553672020-07-14 10:08:01 +020047
48
49Test Teardown
50 [Documentation] Cleanup containers
51 ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
52 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
53 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
54 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
55 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
56 Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}