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_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
15 ######### Single file, SFTP
17 Verify single event with single 1MB SFTP file. From event poll to published file
18 [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
21 Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
22 Set Environment Variable MR_TC --tc100
23 Set Environment Variable DR_TC --tc normal
24 Set Environment Variable DR_REDIR_TC --tc normal
25 Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
26 Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
27 Set Environment Variable DR_REDIR_FEEDS 2:A
28 Set Environment Variable FTP_FILE_PREFIXES A
29 Set Environment Variable NUM_FTPFILES 1
30 Set Environment Variable NUM_PNFS 1
31 Set Environment Variable FILE_SIZE 1MB
32 Set Environment Variable FTP_TYPE SFTP
33 Set Environment Variable NUM_FTP_SERVERS 1
34 Set Environment Variable DR_FEEDS 2:A
35 Set Environment Variable DR_REDIR_SIM drsim_redir
36 Set Environment Variable SFTP_SIMS sftp-server0:22
37 Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
39 ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
40 Log To Console Simulator-start:
41 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
42 MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
43 DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
45 ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
46 Log To Console Consul APP write:
47 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
49 ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
50 Log To Console Consul APP read:
51 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
53 ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
54 Log To Console CBS merged configuration:
55 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
59 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
60 Log To Console Dfc-start:
61 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
63 Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
64 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
65 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
66 DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
68 ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
69 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
70 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
71 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
73 Verify single event with single 5MB SFTP file. From event poll to published file
74 [TAGS] DFC_FUNCTIONAL_2
75 [Documentation] Verify single event with single SFTP 5MB file from event poll to published file.
76 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT
77 Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
78 Set Environment Variable MR_TC --tc101
79 Set Environment Variable DR_TC --tc normal
80 Set Environment Variable DR_REDIR_TC --tc normal
81 Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
82 Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
83 Set Environment Variable DR_REDIR_FEEDS 2:A
84 Set Environment Variable FTP_FILE_PREFIXES A
85 Set Environment Variable NUM_FTPFILES 1
86 Set Environment Variable NUM_PNFS 1
87 Set Environment Variable FILE_SIZE 5MB
88 Set Environment Variable FTP_TYPE SFTP
89 Set Environment Variable NUM_FTP_SERVERS 1
90 Set Environment Variable DR_FEEDS 2:A
91 Set Environment Variable DR_REDIR_SIM drsim_redir
92 Set Environment Variable SFTP_SIMS sftp-server0:22
93 Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
95 ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
96 Log To Console Simulator-start: ${cli_cmd_output.stdout}
97 MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
98 DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
100 ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
101 Log To Console Consul APP write:
102 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
104 ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
105 Log To Console Consul APP read:
106 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
108 ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
109 Log To Console CBS merged configuration:
110 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
114 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
115 Log To Console Dfc-start:
116 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
118 Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
119 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
120 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
121 DR Redir Sim Downloaded Volume Equal 5 000 000 #Verify 5 000 000 bytes published file data in DR redir sim
123 ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
124 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
125 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
126 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
128 ${cli_cmd_output}= Run Process docker stop $(docker ps -aq) shell=yes
129 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
131 ${cli_cmd_output}= Run Process docker rm $(docker ps -aq) shell=yes
132 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
136 Verify single event with single 50MB SFTP file. From event poll to published file
137 [TAGS] DFC_FUNCTIONAL_3
138 [Documentation] Verify single event with single SFTP 50MB file from event poll to published file.
139 ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
140 Set Environment Variable MR_TC --tc102
141 Set Environment Variable DR_TC --tc normal
142 Set Environment Variable DR_REDIR_TC --tc normal
143 Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES
144 Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A
145 Set Environment Variable DR_REDIR_FEEDS 2:A
146 Set Environment Variable FTP_FILE_PREFIXES A
147 Set Environment Variable NUM_FTPFILES 1
148 Set Environment Variable NUM_PNFS 1
149 Set Environment Variable FILE_SIZE 50MB
150 Set Environment Variable FTP_TYPE SFTP
151 Set Environment Variable NUM_FTP_SERVERS 1
152 Set Environment Variable DR_FEEDS 2:A
153 Set Environment Variable DR_REDIR_SIM drsim_redir
154 Set Environment Variable SFTP_SIMS sftp-server0:22
155 Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21
157 ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
158 Log To Console Simulator-start: ${cli_cmd_output.stdout}
159 MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
160 DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
162 ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes
163 Log To Console Consul APP write:
164 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
166 ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes
167 Log To Console Consul APP read:
168 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
170 ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes
171 Log To Console CBS merged configuration:
172 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
176 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
177 Log To Console Dfc-start:
178 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
180 Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
181 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
182 Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
183 DR Redir Sim Downloaded Volume Equal 50 000 000 #Verify 50 000 000 bytes published file data in DR redir sim
185 ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
186 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
187 ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
188 Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr}
190 ######### Single file, FTPS
191 # Temporarily removed due to issues with the certificates for the ftsp server simulator cert.
192 #Verify single event with single 1MB FTPS file. From event poll to published file
193 # [TAGS] DFC_FUNCTIONAL_10
194 # [Documentation] Verify single event with single FTPS 1MB file from event poll to published file.
195 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
196 # Set Environment Variable MR_TC --tc200
197 # Set Environment Variable DR_TC --tc normal
198 # Set Environment Variable DR_REDIR_TC --tc normal
199 # Set Environment Variable NUM_FTPFILES 1
200 # Set Environment Variable NUM_PNFS 1
201 # Set Environment Variable FILE_SIZE 1MB
202 # Set Environment Variable FTP_TYPE FTPS
203 # ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
204 # MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
205 # DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
206 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
207 # Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
208 # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
209 # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
210 # DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim
211 # ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
212 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
214 #Verify single event with single 5MB FTPS file. From event poll to published file
215 # [TAGS] DFC_FUNCTIONAL_11
216 # [Documentation] Verify single event with single FTPS 5MB file from event poll to published file.
217 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
218 # Set Environment Variable MR_TC --tc201
219 # Set Environment Variable DR_TC --tc normal
220 # Set Environment Variable DR_REDIR_TC --tc normal
221 # Set Environment Variable NUM_FTPFILES 1
222 # Set Environment Variable NUM_PNFS 1
223 # Set Environment Variable FILE_SIZE 5MB
224 # Set Environment Variable FTP_TYPE FTPS
225 # ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
226 # MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
227 # DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
228 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
229 # Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
230 # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
231 # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
232 # DR Redir Sim Downloaded Volume Equal 5 000 000 #Verify 5 000 000 bytes published file data in DR redir sim
233 # ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
234 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh
236 #Verify single event with single 50MB FTPS file. From event poll to published file
237 # [TAGS] DFC_FUNCTIONAL_12
238 # [Documentation] Verify single event with single FTPS 50MB file from event poll to published file.
239 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh
240 # Set Environment Variable MR_TC --tc202
241 # Set Environment Variable DR_TC --tc normal
242 # Set Environment Variable DR_REDIR_TC --tc normal
243 # Set Environment Variable NUM_FTPFILES 1
244 # Set Environment Variable NUM_PNFS 1
245 # Set Environment Variable FILE_SIZE 50MB
246 # Set Environment Variable FTP_TYPE FTPS
247 # ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT}
248 # MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim
249 # DR Sim Published Files Equal 0 #Verify 0 file published to DR sim
250 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT}
251 # Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim
252 # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files
253 # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim
254 # DR Redir Sim Downloaded Volume Equal 50 000 000 #Verify 50 000 000 bytes published file data in DR redir sim
255 # ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh
256 # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh