2 Library OperatingSystem
3 Library RequestsLibrary
6 Resource ../../resources/common-keywords.robot
9 ${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_HTTPS.json
10 ${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw
11 ${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0
15 ######## Single file, HTTP
17 Verify single event with single 1MB HTTP file. From event poll to published file
18 [TAGS] DFC_FUNCTIONAL_20
19 [Documentation] Verify single event with single HTTP 1MB file from event poll to published file.
20 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
21 Verify Single Event From Event Poll To Published File 1 --tc300 HTTP
24 Verify single event with single 5MB HTTP file. From event poll to published file
25 [TAGS] DFC_FUNCTIONAL_21
26 [Documentation] Verify single event with single HTTP 5MB file from event poll to published file.
27 Verify Single Event From Event Poll To Published File 5 --tc301 HTTP
30 Verify single event with single 50MB HTTP file. From event poll to published file
31 [TAGS] DFC_FUNCTIONAL_22
32 [Documentation] Verify single event with single HTTP 50MB file from event poll to published file.
33 Verify Single Event From Event Poll To Published File 50 --tc302 HTTP
35 ######## Single file, HTTP
36 Verify single event with single 1MB HTTPS (basic authentication) file. From event poll to published file
37 [TAGS] DFC_FUNCTIONAL_30
38 [Documentation] Verify single event with single HTTPS (basic authentication) 1MB file from event poll to published file.
39 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
40 Verify Single Event From Event Poll To Published File 1 --tc400 HTTPS
43 Verify single event with single 5MB HTTPS (basic authentication) file. From event poll to published file
44 [TAGS] DFC_FUNCTIONAL_31
45 [Documentation] Verify single event with single HTTPS (basic authentication) 5MB file from event poll to published file.
46 Verify Single Event From Event Poll To Published File 5 --tc401 HTTPS
49 Verify single event with single 50MB HTTPS (basic authentication) file. From event poll to published file
50 [TAGS] DFC_FUNCTIONAL_32
51 [Documentation] Verify single event with single HTTPS (basic authentication) 50MB file from event poll to published file.
52 Verify Single Event From Event Poll To Published File 50 --tc402 HTTPS
56 Verify Single Event From Event Poll To Published File
57 [Documentation] Keyword to verify single event with file with given parameters.
58 [Arguments] ${file_size_in_mb} ${mr_tc} ${http_type}
59 Set Environment Variable MR_TC ${mr_tc}
60 Set Environment Variable FILE_SIZE ${file_size_in_mb}MB
61 Set Environment Variable HTTP_TYPE ${http_type}
62 Set Default Environment Variables
64 ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
65 Log To Console Simulator-start:
66 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
67 MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
68 DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
70 ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
71 Log To Console Consul APP write:
72 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
74 ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
75 Log To Console Consul APP read:
76 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
78 ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
79 Log To Console CBS merged configuration:
80 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
86 Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
87 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
88 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
89 DR Redir Sim Downloaded Volume Equal ${file_size_in_mb} 000 000 #Verify correct number of bytes published file data in DR redir sim
91 [Teardown] Test Teardown
93 Set Default Environment Variables
94 [Documentation] Set default environment variables for simulators setup
95 Set Environment Variable DR_TC --tc normal
96 Set Environment Variable DR_REDIR_TC --tc normal
97 Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
98 Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
99 Set Environment Variable DR_REDIR_FEEDS 2:A
100 Set Environment Variable FTP_FILE_PREFIXES A
101 Set Environment Variable FTP_TYPE SFTP
102 Set Environment Variable HTTP_FILE_PREFIXES A
103 Set Environment Variable NUM_FTPFILES 1
104 Set Environment Variable NUM_HTTPFILES 1
105 Set Environment Variable NUM_PNFS 1
106 Set Environment Variable NUM_FTP_SERVERS 1
107 Set Environment Variable NUM_HTTP_SERVERS 1
108 Set Environment Variable DR_FEEDS 2:A
109 Set Environment Variable DR_REDIR_SIM drsim_redir
110 Set Environment Variable SFTP_SIMS sftp-server0:22
111 Set Environment Variable FTPES_SIMS ftpes-server-vsftpd0:21
112 Set Environment Variable HTTP_SIMS http-https-server0:80
113 Set Environment Variable HTTPS_SIMS http-https-server0:443
114 Set Environment Variable HTTPS_SIMS_NO_AUTH http-https-server0:8080