blob: 462a7dd37e4ae76c43eac5a1d80cb1a636e0a2f6 [file] [log] [blame]
BjornMagnussonXAa79a0432019-07-17 08:26:50 +00001#!/bin/bash
2
3TC_ONELINE_DESCR="Test script for auto test and simulator control"
4
5. ../common/testcase_common.sh $1 $2
6
7#### TEST BEGIN ####
8
9clean_containers
10
11export MR_TC="--tc1000"
12export MR_GROUPS="OpenDcae-c12:PM_MEAS_FILES:CTR_MEAS_FILES,OpenDcae-c13:CTR_MEAS_FILES,OpenDcae-c14:LOG_FILES,OpenDcae-c15:PM_MEAS_FILES:TEST_FILES,OpenDcae-c16:TEST_FILES:TEMP_FILES"
13export MR_FILE_PREFIX_MAPPING="PM_MEAS_FILES:A,CTR_MEAS_FILES:B,LOG_FILES:C,TEST_FILES:D,TEMP_FILES:E"
14
15export DR_TC="--tc normal"
16export DR_FEEDS="1:A,2:B,3:C,4:D,5:E"
17
18export DR_REDIR_TC="--tc normal"
19export DR_REDIR_FEEDS="1:A,2:B,3:C,4:D,5:E"
20
21export NUM_FTPFILES="300"
22export NUM_PNFS="5"
23export FILE_SIZE="1MB"
24export FTP_TYPE="SFTP"
25export FTP_FILE_PREFIXES="A,B,C,D,E"
26export NUM_FTP_SERVERS=5
27
28
29
30log_sim_settings
31
32start_simulators
33
34consul_config_app 0 "../simulator-group/consul/c12_feed1_PM_feed2_CTR.json"
35consul_config_dmaap 0 "../simulator-group/consul/dmaap_feed1_2_3_4_5.json"
36
37consul_config_app 1 "../simulator-group/consul/c13_feed2_CTR.json"
38consul_config_dmaap 1 "../simulator-group/consul/dmaap_feed1_2_3_4_5.json"
39
40consul_config_app 2 "../simulator-group/consul/c14_feed3_LOG.json"
41consul_config_dmaap 2 "../simulator-group/consul/dmaap_feed1_2_3_4_5.json"
42
43consul_config_app 3 "../simulator-group/consul/c15_feed1_PM_feed4_TEST.json"
44consul_config_dmaap 3 "../simulator-group/consul/dmaap_feed1_2_3_4_5.json"
45
46consul_config_app 2 "../simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json"
47consul_config_dmaap 4 "../simulator-group/consul/dmaap_feed1_2_3_4_5.json"
48
49
50mr_print ""
51mr_print groups
52mr_print changeids
53mr_print fileprefixes
54mr_print tc_info
55mr_print status
56mr_print stop
57mr_print start
58
59mr_print ctr_requests
60mr_print groups/ctr_requests
61mr_print ctr_requests/OpenDcae-c12
62mr_print ctr_requests/OpenDcae-c13
63mr_print ctr_requests/OpenDcae-c14
64mr_print ctr_requests/OpenDcae-c15
65mr_print ctr_requests/OpenDcae-c16
66
67mr_print ctr_responses
68mr_print groups/ctr_responses
69mr_print ctr_responses/OpenDcae-c12
70mr_print ctr_responses/OpenDcae-c13
71mr_print ctr_responses/OpenDcae-c14
72mr_print ctr_responses/OpenDcae-c15
73mr_print ctr_responses/OpenDcae-c16
74
75mr_print ctr_files
76mr_print groups/ctr_files
77mr_print ctr_files/OpenDcae-c12
78mr_print ctr_files/OpenDcae-c13
79mr_print ctr_files/OpenDcae-c14
80mr_print ctr_files/OpenDcae-c15
81mr_print ctr_files/OpenDcae-c16
82
83mr_print ctr_unique_files
84mr_print groups/ctr_unique_files
85mr_print ctr_unique_files/OpenDcae-c12
86mr_print ctr_unique_files/OpenDcae-c13
87mr_print ctr_unique_files/OpenDcae-c14
88mr_print ctr_unique_files/OpenDcae-c15
89mr_print ctr_unique_files/OpenDcae-c16
90
91mr_print ctr_events
92mr_print groups/ctr_events
93mr_print ctr_events/OpenDcae-c12
94mr_print ctr_events/OpenDcae-c13
95mr_print ctr_events/OpenDcae-c14
96mr_print ctr_events/OpenDcae-c15
97mr_print ctr_events/OpenDcae-c16
98
99mr_contain_str groups "OpenDcae-c12,OpenDcae-c13,OpenDcae-c14,OpenDcae-c15,OpenDcae-c16"
100mr_contain_str changeids "PM_MEAS_FILES:CTR_MEAS_FILES,CTR_MEAS_FILES,LOG_FILES,PM_MEAS_FILES:TEST_FILES,TEST_FILES:TEMP_FILES"
101mr_contain_str fileprefixes $MR_FILE_PREFIX_MAPPING
102mr_contain_str tc_info "TC#1000"
103mr_contain_str status "Started"
104mr_contain_str stop "Stopped"
105mr_contain_str start "Started"
106
107mr_equal ctr_requests 0
108mr_contain_str groups/ctr_requests "0,0,0,0,0"
109mr_equal ctr_requests/OpenDcae-c12 0
110mr_equal ctr_requests/OpenDcae-c13 0
111mr_equal ctr_requests/OpenDcae-c14 0
112mr_equal ctr_requests/OpenDcae-c15 0
113mr_equal ctr_requests/OpenDcae-c16 0
114
115mr_equal ctr_responses 0
116mr_contain_str groups/ctr_responses "0,0,0,0,0"
117mr_equal ctr_responses/OpenDcae-c12 0
118mr_equal ctr_responses/OpenDcae-c13 0
119mr_equal ctr_responses/OpenDcae-c14 0
120mr_equal ctr_responses/OpenDcae-c15 0
121mr_equal ctr_responses/OpenDcae-c16 0
122
123mr_equal ctr_files 0
124mr_contain_str groups/ctr_files "0,0,0,0,0"
125mr_equal ctr_files/OpenDcae-c12 0
126mr_equal ctr_files/OpenDcae-c13 0
127mr_equal ctr_files/OpenDcae-c14 0
128mr_equal ctr_files/OpenDcae-c15 0
129mr_equal ctr_files/OpenDcae-c16 0
130
131mr_equal ctr_unique_files 0
132mr_contain_str groups/ctr_unique_files "0,0,0,0,0"
133mr_equal ctr_unique_files/OpenDcae-c12 0
134mr_equal ctr_unique_files/OpenDcae-c13 0
135mr_equal ctr_unique_files/OpenDcae-c14 0
136mr_equal ctr_unique_files/OpenDcae-c15 0
137mr_equal ctr_unique_files/OpenDcae-c16 0
138
139mr_equal ctr_events 0
140mr_contain_str groups/ctr_events "0,0,0,0,0"
141mr_equal ctr_events/OpenDcae-c12 0
142mr_equal ctr_events/OpenDcae-c13 0
143mr_equal ctr_events/OpenDcae-c14 0
144mr_equal ctr_events/OpenDcae-c15 0
145mr_equal ctr_events/OpenDcae-c16 0
146
147
148dr_print ""
149dr_print tc_info
150dr_print execution_time
151dr_print feeds
152
153dr_print ctr_publish_query
154dr_print feeds/ctr_publish_query
155dr_print ctr_publish_query/1
156dr_print ctr_publish_query/2
157dr_print ctr_publish_query/3
158dr_print ctr_publish_query/4
159dr_print ctr_publish_query/5
160
161dr_print ctr_publish_query_published
162dr_print feeds/ctr_publish_query_published
163dr_print ctr_publish_query_published/1
164dr_print ctr_publish_query_published/2
165dr_print ctr_publish_query_published/3
166dr_print ctr_publish_query_published/4
167dr_print ctr_publish_query_published/5
168
169dr_print ctr_publish_query_not_published
170dr_print feeds/ctr_publish_query_not_published
171dr_print ctr_publish_query_not_published/1
172dr_print ctr_publish_query_not_published/2
173dr_print ctr_publish_query_not_published/3
174dr_print ctr_publish_query_not_published/4
175dr_print ctr_publish_query_not_published/5
176
177dr_print ctr_publish_req
178dr_print feeds/ctr_publish_req
179dr_print ctr_publish_req/1
180dr_print ctr_publish_req/2
181dr_print ctr_publish_req/3
182dr_print ctr_publish_req/4
183dr_print ctr_publish_req/5
184
185dr_print ctr_publish_req_redirect
186dr_print feeds/ctr_publish_req_redirect
187dr_print ctr_publish_req_redirect/1
188dr_print ctr_publish_req_redirect/2
189dr_print ctr_publish_req_redirect/3
190dr_print ctr_publish_req_redirect/4
191dr_print ctr_publish_req_redirect/5
192
193dr_print ctr_publish_req_published
194dr_print feeds/ctr_publish_req_published
195dr_print ctr_publish_req_published/1
196dr_print ctr_publish_req_published/2
197dr_print ctr_publish_req_published/3
198dr_print ctr_publish_req_published/4
199dr_print ctr_publish_req_published/5
200
201dr_print ctr_published_files
202dr_print feeds/ctr_published_files
203dr_print ctr_published_files/1
204dr_print ctr_published_files/2
205dr_print ctr_published_files/3
206dr_print ctr_published_files/4
207dr_print ctr_published_files/5
208
209dr_print ctr_double_publish
210dr_print feeds/ctr_double_publish
211dr_print ctr_double_publish/1
212dr_print ctr_double_publish/2
213dr_print ctr_double_publish/3
214dr_print ctr_double_publish/4
215dr_print ctr_double_publish/5
216
217dr_print ctr_publish_query_bad_file_prefix
218dr_print feeds/ctr_publish_query_bad_file_prefix
219dr_print ctr_publish_query_bad_file_prefix/1
220dr_print ctr_publish_query_bad_file_prefix/2
221dr_print ctr_publish_query_bad_file_prefix/3
222dr_print ctr_publish_query_bad_file_prefix/4
223dr_print ctr_publish_query_bad_file_prefix/5
224
225dr_print ctr_publish_req_bad_file_prefix
226dr_print feeds/ctr_publish_req_bad_file_prefix
227dr_print ctr_publish_req_bad_file_prefix/1
228dr_print ctr_publish_req_bad_file_prefix/2
229dr_print ctr_publish_req_bad_file_prefix/3
230dr_print ctr_publish_req_bad_file_prefix/4
231dr_print ctr_publish_req_bad_file_prefix/5
232
233
234
235
236
237
238dr_contain_str tc_info "normal"
239dr_contain_str execution_time "0:"
240dr_contain_str feeds "1:A,2:B,3:C,4:D,5:E"
241
242dr_equal ctr_publish_query 0
243dr_contain_str feeds/ctr_publish_query "0,0,0,0,0"
244dr_equal ctr_publish_query/1 0
245dr_equal ctr_publish_query/2 0
246dr_equal ctr_publish_query/3 0
247dr_equal ctr_publish_query/4 0
248dr_equal ctr_publish_query/5 0
249
250dr_equal ctr_publish_query_published 0
251dr_contain_str feeds/ctr_publish_query_published "0,0,0,0,0"
252dr_equal ctr_publish_query_published/1 0
253dr_equal ctr_publish_query_published/2 0
254dr_equal ctr_publish_query_published/3 0
255dr_equal ctr_publish_query_published/4 0
256dr_equal ctr_publish_query_published/5 0
257
258dr_equal ctr_publish_query_not_published 0
259dr_contain_str feeds/ctr_publish_query_not_published "0,0,0,0,0"
260dr_equal ctr_publish_query_not_published/1 0
261dr_equal ctr_publish_query_not_published/2 0
262dr_equal ctr_publish_query_not_published/3 0
263dr_equal ctr_publish_query_not_published/4 0
264dr_equal ctr_publish_query_not_published/5 0
265
266dr_equal ctr_publish_req 0
267dr_contain_str feeds/ctr_publish_req "0,0,0,0,0"
268dr_equal ctr_publish_req/1 0
269dr_equal ctr_publish_req/2 0
270dr_equal ctr_publish_req/3 0
271dr_equal ctr_publish_req/4 0
272dr_equal ctr_publish_req/5 0
273
274dr_equal ctr_publish_req_redirect 0
275dr_contain_str feeds/ctr_publish_req_redirect "0,0,0,0,0"
276dr_equal ctr_publish_req_redirect/1 0
277dr_equal ctr_publish_req_redirect/2 0
278dr_equal ctr_publish_req_redirect/3 0
279dr_equal ctr_publish_req_redirect/4 0
280dr_equal ctr_publish_req_redirect/5 0
281
282dr_equal ctr_publish_req_published 0
283dr_contain_str feeds/ctr_publish_req_published "0,0,0,0,0"
284dr_equal ctr_publish_req_published/1 0
285dr_equal ctr_publish_req_published/2 0
286dr_equal ctr_publish_req_published/3 0
287dr_equal ctr_publish_req_published/4 0
288dr_equal ctr_publish_req_published/5 0
289
290dr_equal ctr_published_files 0
291dr_contain_str feeds/ctr_published_files "0,0,0,0,0"
292dr_equal ctr_published_files/1 0
293dr_equal ctr_published_files/2 0
294dr_equal ctr_published_files/3 0
295dr_equal ctr_published_files/4 0
296dr_equal ctr_published_files/5 0
297
298dr_equal ctr_double_publish 0
299dr_contain_str feeds/ctr_double_publish "0,0,0,0,0"
300dr_equal ctr_double_publish/1 0
301dr_equal ctr_double_publish/2 0
302dr_equal ctr_double_publish/3 0
303dr_equal ctr_double_publish/4 0
304dr_equal ctr_double_publish/5 0
305
306dr_equal ctr_publish_query_bad_file_prefix 0
307dr_contain_str feeds/ctr_publish_query_bad_file_prefix "0,0,0,0,0"
308dr_equal ctr_publish_query_bad_file_prefix/1 0
309dr_equal ctr_publish_query_bad_file_prefix/2 0
310dr_equal ctr_publish_query_bad_file_prefix/3 0
311dr_equal ctr_publish_query_bad_file_prefix/4 0
312dr_equal ctr_publish_query_bad_file_prefix/5 0
313
314dr_equal ctr_publish_req_bad_file_prefix 0
315dr_contain_str feeds/ctr_publish_req_bad_file_prefix "0,0,0,0,0"
316dr_equal ctr_publish_req_bad_file_prefix/1 0
317dr_equal ctr_publish_req_bad_file_prefix/2 0
318dr_equal ctr_publish_req_bad_file_prefix/3 0
319dr_equal ctr_publish_req_bad_file_prefix/4 0
320dr_equal ctr_publish_req_bad_file_prefix/5 0
321
322drr_print ""
323drr_print tc_info
324drr_print execution_time
325drr_print feeds
326drr_print speed
327
328drr_print ctr_publish_requests
329drr_print feeds/ctr_publish_requests
330drr_print ctr_publish_requests/1
331drr_print ctr_publish_requests/2
332drr_print ctr_publish_requests/3
333drr_print ctr_publish_requests/4
334drr_print ctr_publish_requests/5
335
336drr_print ctr_publish_requests_bad_file_prefix
337drr_print feeds/ctr_publish_requests_bad_file_prefix
338drr_print ctr_publish_requests_bad_file_prefix/1
339drr_print ctr_publish_requests_bad_file_prefix/2
340drr_print ctr_publish_requests_bad_file_prefix/3
341drr_print ctr_publish_requests_bad_file_prefix/4
342drr_print ctr_publish_requests_bad_file_prefix/5
343
344drr_print ctr_publish_responses
345drr_print feeds/ctr_publish_responses
346drr_print ctr_publish_responses/1
347drr_print ctr_publish_responses/2
348drr_print ctr_publish_responses/3
349drr_print ctr_publish_responses/4
350drr_print ctr_publish_responses/5
351
352drr_print time_lastpublish
353drr_print feeds/time_lastpublish
354drr_print time_lastpublish/1
355drr_print time_lastpublish/2
356drr_print time_lastpublish/3
357drr_print time_lastpublish/4
358drr_print time_lastpublish/5
359
360drr_print dwl_volume
361drr_print feeds/dwl_volume
362drr_print dwl_volume/1
363drr_print dwl_volume/2
364drr_print dwl_volume/3
365drr_print dwl_volume/4
366drr_print dwl_volume/5
367
368
369drr_contain_str tc_info "normal"
370drr_contain_str execution_time "0:"
371drr_contain_str feeds "1:A,2:B,3:C,4:D,5:E"
372drr_equal speed 0
373
374drr_equal ctr_publish_requests 0
375drr_contain_str feeds/ctr_publish_requests "0,0,0,0,0"
376drr_equal ctr_publish_requests/1 0
377drr_equal ctr_publish_requests/2 0
378drr_equal ctr_publish_requests/3 0
379drr_equal ctr_publish_requests/4 0
380drr_equal ctr_publish_requests/5 0
381
382drr_equal ctr_publish_requests_bad_file_prefix 0
383drr_contain_str feeds/ctr_publish_requests_bad_file_prefix "0,0,0,0,0"
384drr_equal ctr_publish_requests_bad_file_prefix/1 0
385drr_equal ctr_publish_requests_bad_file_prefix/2 0
386drr_equal ctr_publish_requests_bad_file_prefix/3 0
387drr_equal ctr_publish_requests_bad_file_prefix/4 0
388drr_equal ctr_publish_requests_bad_file_prefix/5 0
389
390drr_equal ctr_publish_responses 0
391drr_contain_str feeds/ctr_publish_responses "0,0,0,0,0"
392drr_equal ctr_publish_responses/1 0
393drr_equal ctr_publish_responses/2 0
394drr_equal ctr_publish_responses/3 0
395drr_equal ctr_publish_responses/4 0
396drr_equal ctr_publish_responses/5 0
397
398drr_contain_str time_lastpublish "--:--"
399drr_contain_str feeds/time_lastpublish "--:--,--:--,--:--,--:--,--:--"
400drr_contain_str time_lastpublish/1 "--:--"
401drr_contain_str time_lastpublish/2 "--:--"
402drr_contain_str time_lastpublish/3 "--:--"
403drr_contain_str time_lastpublish/4 "--:--"
404drr_contain_str time_lastpublish/5 "--:--"
405
406drr_equal dwl_volume 0
407drr_contain_str feeds/dwl_volume "0,0,0,0,0"
408drr_equal dwl_volume/1 0
409drr_equal dwl_volume/2 0
410drr_equal dwl_volume/3 0
411drr_equal dwl_volume/4 0
412drr_equal dwl_volume/5 0
413
414
415
416
417
418
419
420
421
422
423dr_equal ctr_published_files 0 60
424
425mr_print tc_info
426dr_print tc_info
427drr_print tc_info
428
429start_dfc 0
430start_dfc 1
431start_dfc 2
432start_dfc 3
433start_dfc 4
434
435dr_equal ctr_published_files 1 60
436
437sleep_wait 30
438
439dr_equal ctr_published_files 1
440
441mr_greater ctr_requests 1
442
443mr_equal ctr_events 1
444mr_equal ctr_unique_files 1
445mr_equal ctr_unique_PNFs 1
446
447dr_equal ctr_publish_query 1
448dr_equal ctr_publish_query_published 0
449dr_equal ctr_publish_query_not_published 1
450dr_equal ctr_publish_req 1
451dr_equal ctr_publish_req_redirect 1
452dr_equal ctr_publish_req_published 0
453dr_equal ctr_published_files 1
454dr_equal ctr_double_publish 0
455
456drr_equal ctr_publish_requests 1
457drr_equal ctr_publish_responses 1
458
459drr_equal dwl_volume 1000000
460
461check_dfc_logs
462
463#### TEST COMPLETE ####
464
465store_logs END
466
467print_result