blob: e37a910624edccb6797e68007e4c6b61edd14820 [file] [log] [blame]
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00001*** Settings ***
TamasBakaie81736c2019-08-23 13:31:57 +00002Library OperatingSystem
3Library RequestsLibrary
4Library Process
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00005
TamasBakaie81736c2019-08-23 13:31:57 +00006Resource ../../resources/common-keywords.robot
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +00007
8*** Variables ***
TamasBakaie81736c2019-08-23 13:31:57 +00009${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_MEAS.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
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000012
13*** Test Cases ***
14
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010015######## Single file, HTTP
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000016
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010017Verify 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.
TamasBakaie81736c2019-08-23 13:31:57 +000020 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010021 Verify Single Event From Event Poll To Published File 1 --tc300 HTTP
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020022
23
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010024Verify 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
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020028
29
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010030Verify 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
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020034
35
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020036*** Keywords ***
37Verify Single Event From Event Poll To Published File
38 [Documentation] Keyword to verify single event with file with given parameters.
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010039 [Arguments] ${file_size_in_mb} ${mr_tc} ${http_type}
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020040 Set Environment Variable MR_TC ${mr_tc}
41 Set Environment Variable FILE_SIZE ${file_size_in_mb}MB
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010042 Set Environment Variable HTTP_TYPE ${http_type}
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020043 Set Default Environment Variables
TamasBakaie81736c2019-08-23 13:31:57 +000044
45 ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
yanhuanwang31c75092019-09-11 15:15:21 +020046 Log To Console Simulator-start:
TamasBakaie81736c2019-08-23 13:31:57 +000047 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
48 MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
49 DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
50
51 ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
52 Log To Console Consul APP write:
53 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
54
55 ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
56 Log To Console Consul APP read:
57 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
58
59 ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
60 Log To Console CBS merged configuration:
61 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
62
63 Sleep 10
64
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020065 Start DFC
TamasBakaie81736c2019-08-23 13:31:57 +000066
67 Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
68 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
69 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020070 DR Redir Sim Downloaded Volume Equal ${file_size_in_mb} 000 000 #Verify correct number of bytes published file data in DR redir sim
Remigiusz Janeczek90553672020-07-14 10:08:01 +020071
72 [Teardown] Test Teardown
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000073
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020074Set Default Environment Variables
75 [Documentation] Set default environment variables for simulators setup
TamasBakaie81736c2019-08-23 13:31:57 +000076 Set Environment Variable DR_TC --tc normal
77 Set Environment Variable DR_REDIR_TC --tc normal
78 Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
79 Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
80 Set Environment Variable DR_REDIR_FEEDS 2:A
81 Set Environment Variable FTP_FILE_PREFIXES A
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010082 Set Environment Variable FTP_TYPE SFTP
83 Set Environment Variable HTTP_FILE_PREFIXES A
TamasBakaie81736c2019-08-23 13:31:57 +000084 Set Environment Variable NUM_FTPFILES 1
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010085 Set Environment Variable NUM_HTTPFILES 1
TamasBakaie81736c2019-08-23 13:31:57 +000086 Set Environment Variable NUM_PNFS 1
TamasBakaie81736c2019-08-23 13:31:57 +000087 Set Environment Variable NUM_FTP_SERVERS 1
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010088 Set Environment Variable NUM_HTTP_SERVERS 1
TamasBakaie81736c2019-08-23 13:31:57 +000089 Set Environment Variable DR_FEEDS 2:A
yanhuanwang4805f962019-09-11 20:44:10 +020090 Set Environment Variable DR_REDIR_SIM drsim_redir
TamasBakaie81736c2019-08-23 13:31:57 +000091 Set Environment Variable SFTP_SIMS sftp-server0:22
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020092 Set Environment Variable FTPES_SIMS ftpes-server-vsftpd0:21
Krzysztof Gajewski99ce6a72020-12-29 17:55:27 +010093 Set Environment Variable HTTP_SIMS http-server0:80