aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2-collectors-datafile/resources/common-keywords.robot
blob: a36833e1d236e0197cf384574a87c7df80e0628c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
*** Settings ***
Library   OperatingSystem
Library   RequestsLibrary
Library   Process

*** Variables ***

${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

*** Keywords ***

MR Sim Emitted Files Equal
  [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}

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}