Update DFC tests to use file based conifg
[integration/csit.git] / tests / dcaegen2-collectors-datafile / testsuites / HTTP-Various-Connection-Types-suite / HttpVariousConnectionTypes.robot
1 *** Settings ***
2 Library        OperatingSystem
3 Library        RequestsLibrary
4 Library        Process
5
6 Resource    ../../resources/common-keywords.robot
7
8 *** Variables ***
9 ${DFC_CONFIG_FILE}                         ${SIMGROUP_ROOT}/dfc_configs/c12_feed2_PM_HTTPS.yaml
10
11 *** Test Cases ***
12
13 ######## Single file, HTTPS with various connections
14 Verify single event with single 1MB file with HTTPS connection (basic authentication). From event poll to published file
15     [TAGS]                         DFC_FUNCTIONAL_40
16     [Documentation]                Verify single event with single HTTPS (basic authentication) 1MB file from event poll to published file.
17     ${cli_cmd_output}=              Run Process             ${DFC_ROOT}/../dfc-containers-clean.sh           stderr=STDOUT
18     Verify Single Event From Event Poll To Published File   1    --tc400    HTTPS
19
20
21 Verify single event with single 1MB file HTTPS connection (client certificate authentication). From event poll to published file
22     [TAGS]                         DFC_FUNCTIONAL_41
23     [Documentation]                Verify single event with single 1MB file HTTPS connection (client certificate authentication). From event poll to published file
24     Verify Single Event From Event Poll To Published File   1    --tc403    HTTPS
25
26
27 Verify single event with single 1MB file HTTPS (no authentication). From event poll to published file
28     [TAGS]                         DFC_FUNCTIONAL_42
29     [Documentation]                Verify single event with single 1MB file HTTPS (no authentication). From event poll to published file
30     Verify Single Event From Event Poll To Published File   1   --tc404    HTTPS
31
32
33 Verify single event with single 1MB file with HTTP JWT. From event poll to published file
34     [TAGS]                         DFC_FUNCTIONAL_43
35     [Documentation]                Verify single event with single 1MB file with HTTP JWT. From event poll to published file
36     ${cli_cmd_output}=              Run Process             ${DFC_ROOT}/../dfc-containers-clean.sh           stderr=STDOUT
37     Verify Single Event From Event Poll To Published File   1    --tc303    HTTP
38
39
40 Verify single event with single 1MB file with HTTPS JWT. From event poll to published file
41     [TAGS]                         DFC_FUNCTIONAL_44
42     [Documentation]                Verify single event with single 1MB file with HTTPS JWT. From event poll to published file
43     ${cli_cmd_output}=              Run Process             ${DFC_ROOT}/../dfc-containers-clean.sh           stderr=STDOUT
44     Verify Single Event From Event Poll To Published File   1    --tc405    HTTPS
45
46
47 *** Keywords ***
48 Verify Single Event From Event Poll To Published File
49     [Documentation]                 Keyword to verify single event with file with given parameters.
50     [Arguments]                     ${file_size_in_mb}    ${mr_tc}    ${http_type}
51     Set Environment Variable        MR_TC                   ${mr_tc}
52     Set Environment Variable        FILE_SIZE               ${file_size_in_mb}MB
53     Set Environment Variable        HTTP_TYPE                ${http_type}
54     Set Default Environment Variables
55
56     ${cli_cmd_output}=              Run Process     ./simulators-start.sh    cwd=${SIMGROUP_ROOT}
57     Log To Console                  Simulator-start:
58     Log To Console                  ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
59     MR Sim Emitted Files Equal      0                                                                                   #Verify 0 file emitted from MR sim
60     DR Sim Published Files Equal    0                                                                                   #Verify 0 file published to DR sim
61
62     Set DFC config                  ${DFC_CONFIG_FILE}
63
64     Start DFC
65
66     Wait Until Keyword Succeeds     1 minute      10 sec    MR Sim Emitted Files Equal          1                       #Verify 1 file emitted from MR sim
67     Wait Until Keyword Succeeds     1 minute      10 sec    DR Sim Query Not Published Equal    1                       #Verify 1 query response for not published files
68     Wait Until Keyword Succeeds     1 minute      10 sec    DR Sim Published Files Equal        1                       #Verify 1 file published to DR sim
69     DR Redir Sim Downloaded Volume Equal          ${file_size_in_mb} 000 000                                            #Verify correct number of bytes published file data in DR redir sim
70
71     [Teardown]                      Test Teardown
72
73 Set Default Environment Variables
74     [Documentation]                 Set default environment variables for simulators setup
75     Set Environment Variable        DR_TC                   --tc normal
76     Set Environment Variable        DR_REDIR_TC             --tc normal
77     Set Environment Variable        MR_GROUPS               OpenDcae-c12:PM_MEAS_FILES
78     Set Environment Variable        MR_FILE_PREFIX_MAPPING  PM_MEAS_FILES:A
79     Set Environment Variable        DR_REDIR_FEEDS          2:A
80     Set Environment Variable        FTP_FILE_PREFIXES       A
81     Set Environment Variable        FTP_TYPE                SFTP
82     Set Environment Variable        HTTP_FILE_PREFIXES      A
83     Set Environment Variable        NUM_FTPFILES            1
84     Set Environment Variable        NUM_HTTPFILES           1
85     Set Environment Variable        NUM_PNFS                1
86     Set Environment Variable        NUM_FTP_SERVERS         1
87     Set Environment Variable        NUM_HTTP_SERVERS        1
88     Set Environment Variable        DR_FEEDS                2:A
89     Set Environment Variable        DR_REDIR_SIM            drsim_redir
90     Set Environment Variable        SFTP_SIMS               sftp-server0:22
91     Set Environment Variable        FTPES_SIMS              ftpes-server-vsftpd0:21
92     Set Environment Variable        HTTP_SIMS               http-https-server0:80
93     Set Environment Variable        HTTPS_SIMS              http-https-server0:443
94     Set Environment Variable        HTTPS_SIMS_NO_AUTH      http-https-server0:8080
95     Set Environment Variable        HTTP_JWT_SIMS           http-https-server0:32000
96     Set Environment Variable        HTTPS_JWT_SIMS          http-https-server0:32100