blob: 7c7d3543f0a401fbd8f3206d6fd2a7f8f884c09d [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"
BjornMagnussonXAa79a0432019-07-17 08:26:50 +000035
36consul_config_app 1 "../simulator-group/consul/c13_feed2_CTR.json"
BjornMagnussonXAa79a0432019-07-17 08:26:50 +000037
38consul_config_app 2 "../simulator-group/consul/c14_feed3_LOG.json"
BjornMagnussonXAa79a0432019-07-17 08:26:50 +000039
40consul_config_app 3 "../simulator-group/consul/c15_feed1_PM_feed4_TEST.json"
BjornMagnussonXAa79a0432019-07-17 08:26:50 +000041
42consul_config_app 2 "../simulator-group/consul/c16_feed4_TEST_feed5_TEMP.json"
BjornMagnussonXAa79a0432019-07-17 08:26:50 +000043
44
45mr_print ""
46mr_print groups
47mr_print changeids
48mr_print fileprefixes
49mr_print tc_info
50mr_print status
51mr_print stop
52mr_print start
53
54mr_print ctr_requests
55mr_print groups/ctr_requests
56mr_print ctr_requests/OpenDcae-c12
57mr_print ctr_requests/OpenDcae-c13
58mr_print ctr_requests/OpenDcae-c14
59mr_print ctr_requests/OpenDcae-c15
60mr_print ctr_requests/OpenDcae-c16
61
62mr_print ctr_responses
63mr_print groups/ctr_responses
64mr_print ctr_responses/OpenDcae-c12
65mr_print ctr_responses/OpenDcae-c13
66mr_print ctr_responses/OpenDcae-c14
67mr_print ctr_responses/OpenDcae-c15
68mr_print ctr_responses/OpenDcae-c16
69
70mr_print ctr_files
71mr_print groups/ctr_files
72mr_print ctr_files/OpenDcae-c12
73mr_print ctr_files/OpenDcae-c13
74mr_print ctr_files/OpenDcae-c14
75mr_print ctr_files/OpenDcae-c15
76mr_print ctr_files/OpenDcae-c16
77
78mr_print ctr_unique_files
79mr_print groups/ctr_unique_files
80mr_print ctr_unique_files/OpenDcae-c12
81mr_print ctr_unique_files/OpenDcae-c13
82mr_print ctr_unique_files/OpenDcae-c14
83mr_print ctr_unique_files/OpenDcae-c15
84mr_print ctr_unique_files/OpenDcae-c16
85
86mr_print ctr_events
87mr_print groups/ctr_events
88mr_print ctr_events/OpenDcae-c12
89mr_print ctr_events/OpenDcae-c13
90mr_print ctr_events/OpenDcae-c14
91mr_print ctr_events/OpenDcae-c15
92mr_print ctr_events/OpenDcae-c16
93
94mr_contain_str groups "OpenDcae-c12,OpenDcae-c13,OpenDcae-c14,OpenDcae-c15,OpenDcae-c16"
95mr_contain_str changeids "PM_MEAS_FILES:CTR_MEAS_FILES,CTR_MEAS_FILES,LOG_FILES,PM_MEAS_FILES:TEST_FILES,TEST_FILES:TEMP_FILES"
96mr_contain_str fileprefixes $MR_FILE_PREFIX_MAPPING
97mr_contain_str tc_info "TC#1000"
98mr_contain_str status "Started"
99mr_contain_str stop "Stopped"
100mr_contain_str start "Started"
101
102mr_equal ctr_requests 0
103mr_contain_str groups/ctr_requests "0,0,0,0,0"
104mr_equal ctr_requests/OpenDcae-c12 0
105mr_equal ctr_requests/OpenDcae-c13 0
106mr_equal ctr_requests/OpenDcae-c14 0
107mr_equal ctr_requests/OpenDcae-c15 0
108mr_equal ctr_requests/OpenDcae-c16 0
109
110mr_equal ctr_responses 0
111mr_contain_str groups/ctr_responses "0,0,0,0,0"
112mr_equal ctr_responses/OpenDcae-c12 0
113mr_equal ctr_responses/OpenDcae-c13 0
114mr_equal ctr_responses/OpenDcae-c14 0
115mr_equal ctr_responses/OpenDcae-c15 0
116mr_equal ctr_responses/OpenDcae-c16 0
117
118mr_equal ctr_files 0
119mr_contain_str groups/ctr_files "0,0,0,0,0"
120mr_equal ctr_files/OpenDcae-c12 0
121mr_equal ctr_files/OpenDcae-c13 0
122mr_equal ctr_files/OpenDcae-c14 0
123mr_equal ctr_files/OpenDcae-c15 0
124mr_equal ctr_files/OpenDcae-c16 0
125
126mr_equal ctr_unique_files 0
127mr_contain_str groups/ctr_unique_files "0,0,0,0,0"
128mr_equal ctr_unique_files/OpenDcae-c12 0
129mr_equal ctr_unique_files/OpenDcae-c13 0
130mr_equal ctr_unique_files/OpenDcae-c14 0
131mr_equal ctr_unique_files/OpenDcae-c15 0
132mr_equal ctr_unique_files/OpenDcae-c16 0
133
134mr_equal ctr_events 0
135mr_contain_str groups/ctr_events "0,0,0,0,0"
136mr_equal ctr_events/OpenDcae-c12 0
137mr_equal ctr_events/OpenDcae-c13 0
138mr_equal ctr_events/OpenDcae-c14 0
139mr_equal ctr_events/OpenDcae-c15 0
140mr_equal ctr_events/OpenDcae-c16 0
141
142
143dr_print ""
144dr_print tc_info
145dr_print execution_time
146dr_print feeds
147
148dr_print ctr_publish_query
149dr_print feeds/ctr_publish_query
150dr_print ctr_publish_query/1
151dr_print ctr_publish_query/2
152dr_print ctr_publish_query/3
153dr_print ctr_publish_query/4
154dr_print ctr_publish_query/5
155
156dr_print ctr_publish_query_published
157dr_print feeds/ctr_publish_query_published
158dr_print ctr_publish_query_published/1
159dr_print ctr_publish_query_published/2
160dr_print ctr_publish_query_published/3
161dr_print ctr_publish_query_published/4
162dr_print ctr_publish_query_published/5
163
164dr_print ctr_publish_query_not_published
165dr_print feeds/ctr_publish_query_not_published
166dr_print ctr_publish_query_not_published/1
167dr_print ctr_publish_query_not_published/2
168dr_print ctr_publish_query_not_published/3
169dr_print ctr_publish_query_not_published/4
170dr_print ctr_publish_query_not_published/5
171
172dr_print ctr_publish_req
173dr_print feeds/ctr_publish_req
174dr_print ctr_publish_req/1
175dr_print ctr_publish_req/2
176dr_print ctr_publish_req/3
177dr_print ctr_publish_req/4
178dr_print ctr_publish_req/5
179
180dr_print ctr_publish_req_redirect
181dr_print feeds/ctr_publish_req_redirect
182dr_print ctr_publish_req_redirect/1
183dr_print ctr_publish_req_redirect/2
184dr_print ctr_publish_req_redirect/3
185dr_print ctr_publish_req_redirect/4
186dr_print ctr_publish_req_redirect/5
187
188dr_print ctr_publish_req_published
189dr_print feeds/ctr_publish_req_published
190dr_print ctr_publish_req_published/1
191dr_print ctr_publish_req_published/2
192dr_print ctr_publish_req_published/3
193dr_print ctr_publish_req_published/4
194dr_print ctr_publish_req_published/5
195
196dr_print ctr_published_files
197dr_print feeds/ctr_published_files
198dr_print ctr_published_files/1
199dr_print ctr_published_files/2
200dr_print ctr_published_files/3
201dr_print ctr_published_files/4
202dr_print ctr_published_files/5
203
204dr_print ctr_double_publish
205dr_print feeds/ctr_double_publish
206dr_print ctr_double_publish/1
207dr_print ctr_double_publish/2
208dr_print ctr_double_publish/3
209dr_print ctr_double_publish/4
210dr_print ctr_double_publish/5
211
212dr_print ctr_publish_query_bad_file_prefix
213dr_print feeds/ctr_publish_query_bad_file_prefix
214dr_print ctr_publish_query_bad_file_prefix/1
215dr_print ctr_publish_query_bad_file_prefix/2
216dr_print ctr_publish_query_bad_file_prefix/3
217dr_print ctr_publish_query_bad_file_prefix/4
218dr_print ctr_publish_query_bad_file_prefix/5
219
220dr_print ctr_publish_req_bad_file_prefix
221dr_print feeds/ctr_publish_req_bad_file_prefix
222dr_print ctr_publish_req_bad_file_prefix/1
223dr_print ctr_publish_req_bad_file_prefix/2
224dr_print ctr_publish_req_bad_file_prefix/3
225dr_print ctr_publish_req_bad_file_prefix/4
226dr_print ctr_publish_req_bad_file_prefix/5
227
228
229
230
231
232
233dr_contain_str tc_info "normal"
234dr_contain_str execution_time "0:"
235dr_contain_str feeds "1:A,2:B,3:C,4:D,5:E"
236
237dr_equal ctr_publish_query 0
238dr_contain_str feeds/ctr_publish_query "0,0,0,0,0"
239dr_equal ctr_publish_query/1 0
240dr_equal ctr_publish_query/2 0
241dr_equal ctr_publish_query/3 0
242dr_equal ctr_publish_query/4 0
243dr_equal ctr_publish_query/5 0
244
245dr_equal ctr_publish_query_published 0
246dr_contain_str feeds/ctr_publish_query_published "0,0,0,0,0"
247dr_equal ctr_publish_query_published/1 0
248dr_equal ctr_publish_query_published/2 0
249dr_equal ctr_publish_query_published/3 0
250dr_equal ctr_publish_query_published/4 0
251dr_equal ctr_publish_query_published/5 0
252
253dr_equal ctr_publish_query_not_published 0
254dr_contain_str feeds/ctr_publish_query_not_published "0,0,0,0,0"
255dr_equal ctr_publish_query_not_published/1 0
256dr_equal ctr_publish_query_not_published/2 0
257dr_equal ctr_publish_query_not_published/3 0
258dr_equal ctr_publish_query_not_published/4 0
259dr_equal ctr_publish_query_not_published/5 0
260
261dr_equal ctr_publish_req 0
262dr_contain_str feeds/ctr_publish_req "0,0,0,0,0"
263dr_equal ctr_publish_req/1 0
264dr_equal ctr_publish_req/2 0
265dr_equal ctr_publish_req/3 0
266dr_equal ctr_publish_req/4 0
267dr_equal ctr_publish_req/5 0
268
269dr_equal ctr_publish_req_redirect 0
270dr_contain_str feeds/ctr_publish_req_redirect "0,0,0,0,0"
271dr_equal ctr_publish_req_redirect/1 0
272dr_equal ctr_publish_req_redirect/2 0
273dr_equal ctr_publish_req_redirect/3 0
274dr_equal ctr_publish_req_redirect/4 0
275dr_equal ctr_publish_req_redirect/5 0
276
277dr_equal ctr_publish_req_published 0
278dr_contain_str feeds/ctr_publish_req_published "0,0,0,0,0"
279dr_equal ctr_publish_req_published/1 0
280dr_equal ctr_publish_req_published/2 0
281dr_equal ctr_publish_req_published/3 0
282dr_equal ctr_publish_req_published/4 0
283dr_equal ctr_publish_req_published/5 0
284
285dr_equal ctr_published_files 0
286dr_contain_str feeds/ctr_published_files "0,0,0,0,0"
287dr_equal ctr_published_files/1 0
288dr_equal ctr_published_files/2 0
289dr_equal ctr_published_files/3 0
290dr_equal ctr_published_files/4 0
291dr_equal ctr_published_files/5 0
292
293dr_equal ctr_double_publish 0
294dr_contain_str feeds/ctr_double_publish "0,0,0,0,0"
295dr_equal ctr_double_publish/1 0
296dr_equal ctr_double_publish/2 0
297dr_equal ctr_double_publish/3 0
298dr_equal ctr_double_publish/4 0
299dr_equal ctr_double_publish/5 0
300
301dr_equal ctr_publish_query_bad_file_prefix 0
302dr_contain_str feeds/ctr_publish_query_bad_file_prefix "0,0,0,0,0"
303dr_equal ctr_publish_query_bad_file_prefix/1 0
304dr_equal ctr_publish_query_bad_file_prefix/2 0
305dr_equal ctr_publish_query_bad_file_prefix/3 0
306dr_equal ctr_publish_query_bad_file_prefix/4 0
307dr_equal ctr_publish_query_bad_file_prefix/5 0
308
309dr_equal ctr_publish_req_bad_file_prefix 0
310dr_contain_str feeds/ctr_publish_req_bad_file_prefix "0,0,0,0,0"
311dr_equal ctr_publish_req_bad_file_prefix/1 0
312dr_equal ctr_publish_req_bad_file_prefix/2 0
313dr_equal ctr_publish_req_bad_file_prefix/3 0
314dr_equal ctr_publish_req_bad_file_prefix/4 0
315dr_equal ctr_publish_req_bad_file_prefix/5 0
316
317drr_print ""
318drr_print tc_info
319drr_print execution_time
320drr_print feeds
321drr_print speed
322
323drr_print ctr_publish_requests
324drr_print feeds/ctr_publish_requests
325drr_print ctr_publish_requests/1
326drr_print ctr_publish_requests/2
327drr_print ctr_publish_requests/3
328drr_print ctr_publish_requests/4
329drr_print ctr_publish_requests/5
330
331drr_print ctr_publish_requests_bad_file_prefix
332drr_print feeds/ctr_publish_requests_bad_file_prefix
333drr_print ctr_publish_requests_bad_file_prefix/1
334drr_print ctr_publish_requests_bad_file_prefix/2
335drr_print ctr_publish_requests_bad_file_prefix/3
336drr_print ctr_publish_requests_bad_file_prefix/4
337drr_print ctr_publish_requests_bad_file_prefix/5
338
339drr_print ctr_publish_responses
340drr_print feeds/ctr_publish_responses
341drr_print ctr_publish_responses/1
342drr_print ctr_publish_responses/2
343drr_print ctr_publish_responses/3
344drr_print ctr_publish_responses/4
345drr_print ctr_publish_responses/5
346
347drr_print time_lastpublish
348drr_print feeds/time_lastpublish
349drr_print time_lastpublish/1
350drr_print time_lastpublish/2
351drr_print time_lastpublish/3
352drr_print time_lastpublish/4
353drr_print time_lastpublish/5
354
355drr_print dwl_volume
356drr_print feeds/dwl_volume
357drr_print dwl_volume/1
358drr_print dwl_volume/2
359drr_print dwl_volume/3
360drr_print dwl_volume/4
361drr_print dwl_volume/5
362
363
364drr_contain_str tc_info "normal"
365drr_contain_str execution_time "0:"
366drr_contain_str feeds "1:A,2:B,3:C,4:D,5:E"
367drr_equal speed 0
368
369drr_equal ctr_publish_requests 0
370drr_contain_str feeds/ctr_publish_requests "0,0,0,0,0"
371drr_equal ctr_publish_requests/1 0
372drr_equal ctr_publish_requests/2 0
373drr_equal ctr_publish_requests/3 0
374drr_equal ctr_publish_requests/4 0
375drr_equal ctr_publish_requests/5 0
376
377drr_equal ctr_publish_requests_bad_file_prefix 0
378drr_contain_str feeds/ctr_publish_requests_bad_file_prefix "0,0,0,0,0"
379drr_equal ctr_publish_requests_bad_file_prefix/1 0
380drr_equal ctr_publish_requests_bad_file_prefix/2 0
381drr_equal ctr_publish_requests_bad_file_prefix/3 0
382drr_equal ctr_publish_requests_bad_file_prefix/4 0
383drr_equal ctr_publish_requests_bad_file_prefix/5 0
384
385drr_equal ctr_publish_responses 0
386drr_contain_str feeds/ctr_publish_responses "0,0,0,0,0"
387drr_equal ctr_publish_responses/1 0
388drr_equal ctr_publish_responses/2 0
389drr_equal ctr_publish_responses/3 0
390drr_equal ctr_publish_responses/4 0
391drr_equal ctr_publish_responses/5 0
392
393drr_contain_str time_lastpublish "--:--"
394drr_contain_str feeds/time_lastpublish "--:--,--:--,--:--,--:--,--:--"
395drr_contain_str time_lastpublish/1 "--:--"
396drr_contain_str time_lastpublish/2 "--:--"
397drr_contain_str time_lastpublish/3 "--:--"
398drr_contain_str time_lastpublish/4 "--:--"
399drr_contain_str time_lastpublish/5 "--:--"
400
401drr_equal dwl_volume 0
402drr_contain_str feeds/dwl_volume "0,0,0,0,0"
403drr_equal dwl_volume/1 0
404drr_equal dwl_volume/2 0
405drr_equal dwl_volume/3 0
406drr_equal dwl_volume/4 0
407drr_equal dwl_volume/5 0
408
409
410
411
412
413
414
415
416
417
418dr_equal ctr_published_files 0 60
419
420mr_print tc_info
421dr_print tc_info
422drr_print tc_info
423
424start_dfc 0
425start_dfc 1
426start_dfc 2
427start_dfc 3
428start_dfc 4
429
maximesson69311bf2019-08-30 14:05:15 +0000430dr_greater ctr_published_files 1 60
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000431
432sleep_wait 30
433
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000434mr_greater ctr_requests 1
435
maximesson69311bf2019-08-30 14:05:15 +0000436mr_greater ctr_events 1
437mr_greater ctr_unique_files 1
438mr_greater ctr_unique_PNFs 1
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000439
maximesson69311bf2019-08-30 14:05:15 +0000440dr_greater ctr_publish_query 1
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000441dr_equal ctr_publish_query_published 0
maximesson69311bf2019-08-30 14:05:15 +0000442dr_greater ctr_publish_query_not_published 1
443dr_greater ctr_publish_req 1
444dr_greater ctr_publish_req_redirect 1
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000445dr_equal ctr_publish_req_published 0
maximesson69311bf2019-08-30 14:05:15 +0000446dr_greater ctr_published_files 1
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000447dr_equal ctr_double_publish 0
448
maximesson69311bf2019-08-30 14:05:15 +0000449drr_greater ctr_publish_requests 1
450drr_greater ctr_publish_responses 1
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000451
maximesson69311bf2019-08-30 14:05:15 +0000452drr_greater dwl_volume 1000000
453
454
455####There is a risk of double publishing when running multiple DFCs.
456####The related counters ctr_publish_query_published and ctr_double_publish may be non-zero.
457
BjornMagnussonXAa79a0432019-07-17 08:26:50 +0000458
459check_dfc_logs
460
461#### TEST COMPLETE ####
462
463store_logs END
464
465print_result