blob: bfc823876f4562b226632fdcd0f1182ec5035c75 [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
15######### Single file, SFTP
16
17Verify single event with single 1MB SFTP file. From event poll to published file
TamasBakaie81736c2019-08-23 13:31:57 +000018 [TAGS] DFC_FUNCTIONAL_1
19 [Documentation] Verify single event with single SFTP 1MB file from event poll to published file.
20 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020021 Verify Single Event From Event Poll To Published File 1 --tc100 SFTP
22
23
24Verify single event with single 5MB SFTP file. From event poll to published file
25 [TAGS] DFC_FUNCTIONAL_2
26 [Documentation] Verify single event with single SFTP 5MB file from event poll to published file.
27 Verify Single Event From Event Poll To Published File 5 --tc101 SFTP
28
29
30Verify single event with single 50MB SFTP file. From event poll to published file
31 [TAGS] DFC_FUNCTIONAL_3
32 [Documentation] Verify single event with single SFTP 50MB file from event poll to published file.
33 Verify Single Event From Event Poll To Published File 50 --tc102 SFTP
34
35
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020036######## Single file, FTPES
37Verify single event with single 1MB FTPES file. From event poll to published file
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020038 [TAGS] DFC_FUNCTIONAL_10
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020039 [Documentation] Verify single event with single FTPES 1MB file from event poll to published file.
40 Verify Single Event From Event Poll To Published File 1 --tc200 FTPES
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020041
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020042Verify single event with single 5MB FTPES file. From event poll to published file
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020043 [TAGS] DFC_FUNCTIONAL_11
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020044 [Documentation] Verify single event with single FTPES 5MB file from event poll to published file.
45 Verify Single Event From Event Poll To Published File 5 --tc201 FTPES
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020046
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020047Verify single event with single 50MB FTEPS file. From event poll to published file
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020048 [TAGS] DFC_FUNCTIONAL_12
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +020049 [Documentation] Verify single event with single FTPES 50MB file from event poll to published file.
50 Verify Single Event From Event Poll To Published File 50 --tc202 FTPES
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020051
52*** Keywords ***
53Verify Single Event From Event Poll To Published File
54 [Documentation] Keyword to verify single event with file with given parameters.
55 [Arguments] ${file_size_in_mb} ${mr_tc} ${ftp_type}
56 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
57 Set Environment Variable MR_TC ${mr_tc}
58 Set Environment Variable FILE_SIZE ${file_size_in_mb}MB
59 Set Environment Variable FTP_TYPE ${ftp_type}
60 Set Default Environment Variables
TamasBakaie81736c2019-08-23 13:31:57 +000061
62 ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
yanhuanwang31c75092019-09-11 15:15:21 +020063 Log To Console Simulator-start:
TamasBakaie81736c2019-08-23 13:31:57 +000064 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
65 MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
66 DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
67
68 ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
69 Log To Console Consul APP write:
70 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
71
72 ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
73 Log To Console Consul APP read:
74 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
75
76 ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
77 Log To Console CBS merged configuration:
78 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
79
80 Sleep 10
81
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020082 Start DFC
TamasBakaie81736c2019-08-23 13:31:57 +000083
84 Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
85 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
86 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 +020087 DR Redir Sim Downloaded Volume Equal ${file_size_in_mb} 000 000 #Verify correct number of bytes published file data in DR redir sim
yanhuanwang46c195e2019-09-16 09:46:21 +020088 ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
89 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
90 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
91 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
BjornMagnussonXAd3104ef2019-03-26 12:48:46 +000092
Remigiusz Janeczekc45b7982020-07-24 14:18:42 +020093Set Default Environment Variables
94 [Documentation] Set default environment variables for simulators setup
TamasBakaie81736c2019-08-23 13:31:57 +000095 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 NUM_FTPFILES 1
102 Set Environment Variable NUM_PNFS 1
TamasBakaie81736c2019-08-23 13:31:57 +0000103 Set Environment Variable NUM_FTP_SERVERS 1
104 Set Environment Variable DR_FEEDS 2:A
yanhuanwang4805f962019-09-11 20:44:10 +0200105 Set Environment Variable DR_REDIR_SIM drsim_redir
TamasBakaie81736c2019-08-23 13:31:57 +0000106 Set Environment Variable SFTP_SIMS sftp-server0:22
Remigiusz Janeczekfae33f22020-07-27 15:22:57 +0200107 Set Environment Variable FTPES_SIMS ftpes-server-vsftpd0:21