Update DFC tests to use file based conifg
[integration/csit.git] / tests / dcaegen2-collectors-datafile / testsuites / Functional-Single-File-Ftp-suite / FuncSingleFileFtp.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_MEAS.yaml
10
11 *** Test Cases ***
12
13 ######### Single file, SFTP
14
15 Verify single event with single 1MB SFTP file. From event poll to published file
16     [TAGS]                          DFC_FUNCTIONAL_1
17     [Documentation]                 Verify single event with single SFTP 1MB file from event poll to published file.
18     ${cli_cmd_output}=              Run Process             ${DFC_ROOT}/../dfc-containers-clean.sh           stderr=STDOUT
19     Verify Single Event From Event Poll To Published File   1    --tc100    SFTP
20
21
22 Verify single event with single 5MB SFTP file. From event poll to published file
23     [TAGS]                          DFC_FUNCTIONAL_2
24     [Documentation]                 Verify single event with single SFTP 5MB file from event poll to published file.
25     Verify Single Event From Event Poll To Published File   5    --tc101    SFTP
26
27
28 Verify single event with single 50MB SFTP file. From event poll to published file
29     [TAGS]                          DFC_FUNCTIONAL_3
30     [Documentation]                 Verify single event with single SFTP 50MB file from event poll to published file.
31     Verify Single Event From Event Poll To Published File   50   --tc102    SFTP
32
33
34 ######## Single file, FTPES
35 Verify single event with single 1MB FTPES file. From event poll to published file
36     [TAGS]                         DFC_FUNCTIONAL_10
37     [Documentation]                Verify single event with single FTPES 1MB file from event poll to published file.
38     Verify Single Event From Event Poll To Published File   1    --tc200    FTPES
39
40 Verify single event with single 5MB FTPES file. From event poll to published file
41     [TAGS]                         DFC_FUNCTIONAL_11
42     [Documentation]                Verify single event with single FTPES 5MB file from event poll to published file.
43     Verify Single Event From Event Poll To Published File   5    --tc201    FTPES
44
45 Verify single event with single 50MB FTEPS file. From event poll to published file
46     [TAGS]                         DFC_FUNCTIONAL_12
47     [Documentation]                Verify single event with single FTPES 50MB file from event poll to published file.
48     Verify Single Event From Event Poll To Published File   50   --tc202    FTPES
49
50 *** Keywords ***
51 Verify Single Event From Event Poll To Published File
52     [Documentation]                 Keyword to verify single event with file with given parameters.
53     [Arguments]                     ${file_size_in_mb}    ${mr_tc}    ${ftp_type}
54     Set Environment Variable        MR_TC                   ${mr_tc}
55     Set Environment Variable        FILE_SIZE               ${file_size_in_mb}MB
56     Set Environment Variable        FTP_TYPE                ${ftp_type}
57     Set Default Environment Variables
58
59     ${cli_cmd_output}=              Run Process     ./simulators-start.sh    cwd=${SIMGROUP_ROOT}
60     Log To Console                  Simulator-start:
61     Log To Console                  ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
62     MR Sim Emitted Files Equal      0                                                                                   #Verify 0 file emitted from MR sim
63     DR Sim Published Files Equal    0                                                                                   #Verify 0 file published to DR sim
64
65     Set DFC config                  ${DFC_CONFIG_FILE}
66
67     Start DFC
68
69     Wait Until Keyword Succeeds     1 minute      10 sec    MR Sim Emitted Files Equal          1                       #Verify 1 file emitted from MR sim
70     Wait Until Keyword Succeeds     1 minute      10 sec    DR Sim Query Not Published Equal    1                       #Verify 1 query response for not published files
71     Wait Until Keyword Succeeds     1 minute      10 sec    DR Sim Published Files Equal        1                       #Verify 1 file published to DR sim
72     DR Redir Sim Downloaded Volume Equal          ${file_size_in_mb} 000 000                                            #Verify correct number of bytes published file data in DR redir sim
73
74     [Teardown]                      Test Teardown
75
76 Set Default Environment Variables
77     [Documentation]                 Set default environment variables for simulators setup
78     Set Environment Variable        DR_TC                   --tc normal
79     Set Environment Variable        DR_REDIR_TC             --tc normal
80     Set Environment Variable        MR_GROUPS               OpenDcae-c12:PM_MEAS_FILES
81     Set Environment Variable        MR_FILE_PREFIX_MAPPING  PM_MEAS_FILES:A
82     Set Environment Variable        DR_REDIR_FEEDS          2:A
83     Set Environment Variable        FTP_FILE_PREFIXES       A
84     Set Environment Variable        HTTP_FILE_PREFIXES      A
85     Set Environment Variable        HTTP_TYPE               HTTP
86     Set Environment Variable        NUM_FTPFILES            1
87     Set Environment Variable        NUM_HTTPFILES           1
88     Set Environment Variable        NUM_PNFS                1
89     Set Environment Variable        NUM_FTP_SERVERS         1
90     Set Environment Variable        NUM_HTTP_SERVERS        1
91     Set Environment Variable        DR_FEEDS                2:A
92     Set Environment Variable        DR_REDIR_SIM            drsim_redir
93     Set Environment Variable        SFTP_SIMS               sftp-server0:22
94     Set Environment Variable        FTPES_SIMS              ftpes-server-vsftpd0:21
95     Set Environment Variable        HTTP_SIMS               http-https-server0:80
96     Set Environment Variable        HTTPS_SIMS              http-https-server0:443
97     Set Environment Variable        HTTPS_SIMS_NO_AUTH      http-https-server0:8080
98     Set Environment Variable        HTTP_JWT_SIMS           http-https-server0:32000
99     Set Environment Variable        HTTPS_JWT_SIMS          http-https-server0:32100