3 # ============LICENSE_START===============================================
4 # Copyright (C) 2020 Nordix Foundation. All rights reserved.
5 # ========================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END=================================================
21 TC_ONELINE_DESCR="ICS Create 10000 jobs (ei and info) restart, test job persistency"
23 #App names to include in the test when running docker, space separated list
24 DOCKER_INCLUDED_IMAGES="ICS PRODSTUB CR CP NGW KUBEPROXY"
26 #App names to include in the test when running kubernetes, space separated list
27 KUBE_INCLUDED_IMAGES="ICS PRODSTUB CP CR KUBEPROXY NGW"
28 #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
29 KUBE_PRESTARTED_IMAGES=""
31 #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
32 #the image is not configured in the supplied env_file
33 #Used for images not applicable to all supported profile
34 CONDITIONALLY_IGNORED_IMAGES="NGW"
36 #Supported test environment profiles
37 SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
39 SUPPORTED_RUNMODES="DOCKER KUBE"
41 . ../common/testcase_common.sh $@
57 start_ics NOPROXY $SIM_GROUP/$ICS_COMPOSE_DIR/$ICS_CONFIG_FILE
63 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
65 if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
66 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
71 CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
72 CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
73 TARGET="http://localhost:80/target" # Dummy target
76 use_info_jobs=false #Set flag if interface supporting info-types is used
77 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
79 NUM_JOBS=5000 # 5K ei jobs and 5K info jobs
82 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
83 #Type registration status callbacks
84 TYPESTATUS1="$CR_SERVICE_APP_PATH_0/type-status1"
85 TYPESTATUS2="$CR_SERVICE_APP_PATH_0/type-status2"
87 ics_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1
89 ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
91 ics_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2
93 ics_api_idc_get_subscription_ids 200 owner2 subscription-id-2
97 # Setup prodstub sim to accept calls for producers, types and jobs
98 prodstub_arm_producer 200 prod-a
99 prodstub_arm_producer 200 prod-b
100 prodstub_arm_producer 200 prod-c
101 prodstub_arm_producer 200 prod-d
103 prodstub_arm_type 200 prod-a type1
105 prodstub_arm_type 200 prod-b type1
106 prodstub_arm_type 200 prod-b type2
108 prodstub_arm_type 200 prod-c type1
109 prodstub_arm_type 200 prod-c type2
110 prodstub_arm_type 200 prod-c type3
112 prodstub_arm_type 200 prod-d type4
113 prodstub_arm_type 200 prod-d type5
115 for ((i=1; i<=$NUM_JOBS; i++))
117 if [ $(($i%5)) -eq 0 ]; then
118 prodstub_arm_job_create 200 prod-a job$i
119 prodstub_arm_job_create 200 prod-b job$i
120 prodstub_arm_job_create 200 prod-c job$i
122 if [ $(($i%5)) -eq 1 ]; then
123 prodstub_arm_job_create 200 prod-b job$i
124 prodstub_arm_job_create 200 prod-c job$i
126 if [ $(($i%5)) -eq 2 ]; then
127 prodstub_arm_job_create 200 prod-c job$i
129 if [ $(($i%5)) -eq 3 ]; then
130 prodstub_arm_job_create 200 prod-d job$i
132 if [ $(($i%5)) -eq 4 ]; then
133 prodstub_arm_job_create 200 prod-d job$i
137 if [ $use_info_jobs ]; then
138 prodstub_arm_producer 200 prod-a
139 prodstub_arm_producer 200 prod-b
140 prodstub_arm_producer 200 prod-c
141 prodstub_arm_producer 200 prod-d
143 prodstub_arm_type 200 prod-a type101
145 prodstub_arm_type 200 prod-b type101
146 prodstub_arm_type 200 prod-b type102
148 prodstub_arm_type 200 prod-c type101
149 prodstub_arm_type 200 prod-c type102
150 prodstub_arm_type 200 prod-c type103
152 prodstub_arm_type 200 prod-d type104
153 prodstub_arm_type 200 prod-d type105
155 for ((i=1; i<=$NUM_JOBS; i++))
157 if [ $(($i%5)) -eq 0 ]; then
158 prodstub_arm_job_create 200 prod-a job$(($i+$NUM_JOBS))
159 prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
160 prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
162 if [ $(($i%5)) -eq 1 ]; then
163 prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
164 prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
166 if [ $(($i%5)) -eq 2 ]; then
167 prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
169 if [ $(($i%5)) -eq 3 ]; then
170 prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
172 if [ $(($i%5)) -eq 4 ]; then
173 prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
179 if [ $ICS_VERSION == "V1-1" ]; then
181 ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
183 ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json
185 ics_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json type3 testdata/ics/ei-type-3.json
187 ics_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json type5 testdata/ics/ei-type-5.json
191 ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
192 ics_api_edp_put_type_2 201 type2 testdata/ics/ei-type-2.json
193 ics_api_edp_put_type_2 201 type3 testdata/ics/ei-type-3.json
194 ics_api_edp_put_type_2 201 type4 testdata/ics/ei-type-4.json
195 ics_api_edp_put_type_2 201 type5 testdata/ics/ei-type-5.json
197 ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
199 ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
201 ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
203 ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
205 if [ $use_info_jobs ]; then
206 ics_api_edp_put_type_2 201 type101 testdata/ics/info-type-1.json
207 ics_api_edp_put_type_2 201 type102 testdata/ics/info-type-2.json
208 ics_api_edp_put_type_2 201 type103 testdata/ics/info-type-3.json
209 ics_api_edp_put_type_2 201 type104 testdata/ics/info-type-4.json
210 ics_api_edp_put_type_2 201 type105 testdata/ics/info-type-5.json
214 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
215 cr_equal 0 received_callbacks 20 30
216 cr_equal 0 received_callbacks?id=type-status1 10
217 cr_equal 0 received_callbacks?id=type-status2 10
219 cr_api_check_all_ics_subscription_events 200 0 type-status1 \
220 type1 testdata/ics/ei-type-1.json REGISTERED \
221 type2 testdata/ics/ei-type-2.json REGISTERED \
222 type3 testdata/ics/ei-type-3.json REGISTERED \
223 type4 testdata/ics/ei-type-4.json REGISTERED \
224 type5 testdata/ics/ei-type-5.json REGISTERED \
225 type101 testdata/ics/info-type-1.json REGISTERED \
226 type102 testdata/ics/info-type-2.json REGISTERED \
227 type103 testdata/ics/info-type-3.json REGISTERED \
228 type104 testdata/ics/info-type-4.json REGISTERED \
229 type105 testdata/ics/info-type-5.json REGISTERED
231 cr_api_check_all_ics_subscription_events 200 0 type-status2 \
232 type1 testdata/ics/ei-type-1.json REGISTERED \
233 type2 testdata/ics/ei-type-2.json REGISTERED \
234 type3 testdata/ics/ei-type-3.json REGISTERED \
235 type4 testdata/ics/ei-type-4.json REGISTERED \
236 type5 testdata/ics/ei-type-5.json REGISTERED \
237 type101 testdata/ics/info-type-1.json REGISTERED \
238 type102 testdata/ics/info-type-2.json REGISTERED \
239 type103 testdata/ics/info-type-3.json REGISTERED \
240 type104 testdata/ics/info-type-4.json REGISTERED \
241 type105 testdata/ics/info-type-5.json REGISTERED
245 ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
247 ics_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
249 ics_api_edp_put_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
251 ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
255 if [ $use_info_jobs ]; then
256 ics_equal json:data-producer/v1/info-producers 4
258 ics_equal json:ei-producer/v1/eiproducers 4
261 ics_api_edp_get_producer_status 200 prod-a ENABLED
262 ics_api_edp_get_producer_status 200 prod-b ENABLED
263 ics_api_edp_get_producer_status 200 prod-c ENABLED
264 ics_api_edp_get_producer_status 200 prod-d ENABLED
266 for ((i=1; i<=$NUM_JOBS; i++))
268 if [ $(($i%5)) -eq 0 ]; then
269 ics_api_a1_put_job 201 job$i type1 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1 testdata/ics/job-template.json
270 if [ -z "$FLAT_A1_EI" ]; then
271 ics_api_a1_get_job_status 200 type1 job$i ENABLED
273 ics_api_a1_get_job_status 200 job$i ENABLED 120
275 if [ $use_info_jobs ]; then
276 ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner testdata/ics/job-template.json VALIDATE
277 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120
280 if [ $(($i%5)) -eq 1 ]; then
281 ics_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1 testdata/ics/job-template.json
282 if [ -z "$FLAT_A1_EI" ]; then
283 ics_api_a1_get_job_status 200 type2 job$i ENABLED
285 ics_api_a1_get_job_status 200 job$i ENABLED 120
287 if [ $use_info_jobs ]; then
288 ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner testdata/ics/job-template.json VALIDATE
289 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120
292 if [ $(($i%5)) -eq 2 ]; then
293 ics_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1 testdata/ics/job-template.json
294 if [ -z "$FLAT_A1_EI" ]; then
295 ics_api_a1_get_job_status 200 type3 job$i ENABLED
297 ics_api_a1_get_job_status 200 job$i ENABLED 120
299 if [ $use_info_jobs ]; then
300 ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner testdata/ics/job-template.json VALIDATE
301 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120
304 if [ $(($i%5)) -eq 3 ]; then
305 ics_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1 testdata/ics/job-template.json
306 if [ -z "$FLAT_A1_EI" ]; then
307 ics_api_a1_get_job_status 200 type4 job$i ENABLED
309 ics_api_a1_get_job_status 200 job$i ENABLED 120
311 if [ $use_info_jobs ]; then
312 ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner testdata/ics/job-template.json VALIDATE
313 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
316 if [ $(($i%5)) -eq 4 ]; then
317 ics_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_APP_PATH_0/job_status_ric1 testdata/ics/job-template.json
318 if [ -z "$FLAT_A1_EI" ]; then
319 ics_api_a1_get_job_status 200 type5 job$i ENABLED
321 ics_api_a1_get_job_status 200 job$i ENABLED 120
323 if [ $use_info_jobs ]; then
324 ics_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_APP_PATH_0/job_status_info-owner testdata/ics/job-template.json VALIDATE
325 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
330 if [ -z "$FLAT_A1_EI" ]; then
331 ics_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5))
332 ics_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5))
333 ics_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5))
334 ics_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5))
335 ics_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
337 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
338 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
339 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
340 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
341 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
343 if [ $use_info_jobs ]; then
344 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
345 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
346 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
347 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
348 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
351 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
352 cr_equal 0 received_callbacks 20 30
355 cr_equal 0 received_callbacks 0 30
360 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
362 ics_equal json:/data-consumer/v1/info-type-subscription 2 200
364 ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
365 ics_api_idc_get_subscription_ids 200 owner2 subscription-id-2
367 if [ $use_info_jobs ]; then
368 ics_equal json:data-producer/v1/info-types 10 1000
370 ics_equal json:ei-producer/v1/eitypes 5 1000
383 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
385 ics_equal json:/data-consumer/v1/info-type-subscription 2 200
387 ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
388 ics_api_idc_get_subscription_ids 200 owner2 subscription-id-2
390 if [ $use_info_jobs ]; then
391 ics_equal json:data-producer/v1/info-types 10 1000
393 ics_equal json:ei-producer/v1/eitypes 5 1000
397 cr_equal 0 received_callbacks 0
399 for ((i=1; i<=$NUM_JOBS; i++))
401 if [ $(($i%5)) -eq 0 ]; then
402 prodstub_delete_jobdata 204 prod-a job$i
403 prodstub_delete_jobdata 204 prod-b job$i
404 prodstub_delete_jobdata 204 prod-c job$i
405 if [ $use_info_jobs ]; then
406 prodstub_delete_jobdata 204 prod-a job$(($i+$NUM_JOBS))
407 prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
408 prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
411 if [ $(($i%5)) -eq 1 ]; then
412 prodstub_delete_jobdata 204 prod-b job$i
413 prodstub_delete_jobdata 204 prod-c job$i
414 if [ $use_info_jobs ]; then
415 prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
416 prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
419 if [ $(($i%5)) -eq 2 ]; then
420 prodstub_delete_jobdata 204 prod-c job$i
421 if [ $use_info_jobs ]; then
422 prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
425 if [ $(($i%5)) -eq 3 ]; then
426 prodstub_delete_jobdata 204 prod-d job$i
427 if [ $use_info_jobs ]; then
428 prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
431 if [ $(($i%5)) -eq 4 ]; then
432 prodstub_delete_jobdata 204 prod-d job$i
433 if [ $use_info_jobs ]; then
434 prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
439 ics_api_edp_get_producer_status 404 prod-a
440 ics_api_edp_get_producer_status 404 prod-b
441 ics_api_edp_get_producer_status 404 prod-c
442 ics_api_edp_get_producer_status 404 prod-d
444 for ((i=1; i<=$NUM_JOBS; i++))
446 if [ $(($i%5)) -eq 0 ]; then
447 if [ -z "$FLAT_A1_EI" ]; then
448 ics_api_a1_get_job_status 200 type1 job$i DISABLED
450 ics_api_a1_get_job_status 200 job$i DISABLED 120
452 if [ $use_info_jobs ]; then
453 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
456 if [ $(($i%5)) -eq 1 ]; then
457 if [ -z "$FLAT_A1_EI" ]; then
458 ics_api_a1_get_job_status 200 type2 job$i DISABLED
460 ics_api_a1_get_job_status 200 job$i DISABLED 120
462 if [ $use_info_jobs ]; then
463 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
466 if [ $(($i%5)) -eq 2 ]; then
467 if [ -z "$FLAT_A1_EI" ]; then
468 ics_api_a1_get_job_status 200 type3 job$i DISABLED
470 ics_api_a1_get_job_status 200 job$i DISABLED 120
472 if [ $use_info_jobs ]; then
473 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
476 if [ $(($i%5)) -eq 3 ]; then
477 if [ -z "$FLAT_A1_EI" ]; then
478 ics_api_a1_get_job_status 200 type4 job$i DISABLED
480 ics_api_a1_get_job_status 200 job$i DISABLED 120
482 if [ $use_info_jobs ]; then
483 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
486 if [ $(($i%5)) -eq 4 ]; then
487 if [ -z "$FLAT_A1_EI" ]; then
488 ics_api_a1_get_job_status 200 type5 job$i DISABLED
490 ics_api_a1_get_job_status 200 job$i DISABLED 120
492 if [ $use_info_jobs ]; then
493 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120
498 if [ $ICS_VERSION == "V1-1" ]; then
500 ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
502 ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json
504 ics_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 testdata/ics/ei-type-1.json type2 testdata/ics/ei-type-2.json type3 testdata/ics/ei-type-3.json
506 ics_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json type5 testdata/ics/ei-type-5.json
509 if [ $use_info_jobs ]; then
510 ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
512 ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
514 ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
516 ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
518 ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
520 ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
522 ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
524 ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
529 if [ $use_info_jobs ]; then
530 ics_equal json:data-producer/v1/info-producers 4
532 ics_equal json:ei-producer/v1/eiproducers 4
535 ics_api_edp_get_producer_status 200 prod-a ENABLED
536 ics_api_edp_get_producer_status 200 prod-b ENABLED
537 ics_api_edp_get_producer_status 200 prod-c ENABLED
538 ics_api_edp_get_producer_status 200 prod-d ENABLED
540 for ((i=1; i<=$NUM_JOBS; i++))
542 if [ $(($i%5)) -eq 0 ]; then
543 if [ -z "$FLAT_A1_EI" ]; then
544 ics_api_a1_get_job_status 200 type1 job$i ENABLED
546 ics_api_a1_get_job_status 200 job$i ENABLED 120
548 if [ $use_info_jobs ]; then
549 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120
552 if [ $(($i%5)) -eq 1 ]; then
553 if [ -z "$FLAT_A1_EI" ]; then
554 ics_api_a1_get_job_status 200 type2 job$i ENABLED
556 ics_api_a1_get_job_status 200 job$i ENABLED 120
558 if [ $use_info_jobs ]; then
559 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120
562 if [ $(($i%5)) -eq 2 ]; then
563 if [ -z "$FLAT_A1_EI" ]; then
564 ics_api_a1_get_job_status 200 type3 job$i ENABLED
566 ics_api_a1_get_job_status 200 job$i ENABLED 120
568 if [ $use_info_jobs ]; then
569 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120
572 if [ $(($i%5)) -eq 3 ]; then
573 if [ -z "$FLAT_A1_EI" ]; then
574 ics_api_a1_get_job_status 200 type4 job$i ENABLED
576 ics_api_a1_get_job_status 200 job$i ENABLED 120
578 if [ $use_info_jobs ]; then
579 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
582 if [ $(($i%5)) -eq 4 ]; then
583 if [ -z "$FLAT_A1_EI" ]; then
584 ics_api_a1_get_job_status 200 type5 job$i ENABLED
586 ics_api_a1_get_job_status 200 job$i ENABLED 120
588 if [ $use_info_jobs ]; then
589 ics_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120
595 if [ -z "$FLAT_A1_EI" ]; then
596 ics_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5))
597 ics_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5))
598 ics_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5))
599 ics_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5))
600 ics_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
602 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
603 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
604 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
605 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
606 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
609 if [ $use_info_jobs ]; then
610 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
611 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
612 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
613 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
614 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
617 for ((i=1; i<=$NUM_JOBS; i++))
619 if [ $(($i%5)) -eq 0 ]; then
620 if [ $ICS_VERSION == "V1-1" ]; then
621 prodstub_check_jobdata 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
622 prodstub_check_jobdata 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
623 prodstub_check_jobdata 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
625 if [ $use_info_jobs ]; then
626 prodstub_check_jobdata_3 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
627 prodstub_check_jobdata_3 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
628 prodstub_check_jobdata_3 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
630 prodstub_check_jobdata_2 200 prod-a job$i type1 $TARGET ric1 testdata/ics/job-template.json
631 prodstub_check_jobdata_2 200 prod-b job$i type1 $TARGET ric1 testdata/ics/job-template.json
632 prodstub_check_jobdata_2 200 prod-c job$i type1 $TARGET ric1 testdata/ics/job-template.json
635 if [ $use_info_jobs ]; then
636 prodstub_check_jobdata_3 200 prod-a job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
637 prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
638 prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ics/job-template.json
642 if [ $(($i%5)) -eq 1 ]; then
643 if [ $ICS_VERSION == "V1-1" ]; then
644 prodstub_check_jobdata 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
645 prodstub_check_jobdata 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
647 if [ $use_info_jobs ]; then
648 prodstub_check_jobdata_3 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
649 prodstub_check_jobdata_3 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
651 prodstub_check_jobdata_2 200 prod-b job$i type2 $TARGET ric1 testdata/ics/job-template.json
652 prodstub_check_jobdata_2 200 prod-c job$i type2 $TARGET ric1 testdata/ics/job-template.json
655 if [ $use_info_jobs ]; then
656 prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ics/job-template.json
657 prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ics/job-template.json
660 if [ $(($i%5)) -eq 2 ]; then
661 if [ $ICS_VERSION == "V1-1" ]; then
662 prodstub_check_jobdata 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
664 if [ $use_info_jobs ]; then
665 prodstub_check_jobdata_3 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
667 prodstub_check_jobdata_2 200 prod-c job$i type3 $TARGET ric1 testdata/ics/job-template.json
670 if [ $use_info_jobs ]; then
671 prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type103 $TARGET info-owner testdata/ics/job-template.json
674 if [ $(($i%5)) -eq 3 ]; then
675 if [ $ICS_VERSION == "V1-1" ]; then
676 prodstub_check_jobdata 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
678 if [ $use_info_jobs ]; then
679 prodstub_check_jobdata_3 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
681 prodstub_check_jobdata_2 200 prod-d job$i type4 $TARGET ric1 testdata/ics/job-template.json
684 if [ $use_info_jobs ]; then
685 prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type104 $TARGET info-owner testdata/ics/job-template.json
688 if [ $(($i%5)) -eq 4 ]; then
689 if [ $ICS_VERSION == "V1-1" ]; then
690 prodstub_check_jobdata 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
692 if [ $use_info_jobs ]; then
693 prodstub_check_jobdata_3 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
695 prodstub_check_jobdata_2 200 prod-d job$i type5 $TARGET ric1 testdata/ics/job-template.json
698 if [ $use_info_jobs ]; then
699 prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type105 $TARGET info-owner testdata/ics/job-template.json
705 for ((i=1; i<=$NUM_JOBS; i++))
707 if [ $(($i%5)) -eq 0 ]; then
708 ics_api_a1_delete_job 204 job$i
709 if [ $use_info_jobs ]; then
710 ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
713 if [ $(($i%5)) -eq 1 ]; then
714 ics_api_a1_delete_job 204 job$i
715 if [ $use_info_jobs ]; then
716 ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
719 if [ $(($i%5)) -eq 2 ]; then
720 ics_api_a1_delete_job 204 job$i
721 if [ $use_info_jobs ]; then
722 ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
725 if [ $(($i%5)) -eq 3 ]; then
726 ics_api_a1_delete_job 204 job$i
727 if [ $use_info_jobs ]; then
728 ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
731 if [ $(($i%5)) -eq 4 ]; then
732 ics_api_a1_delete_job 204 job$i
733 if [ $use_info_jobs ]; then
734 ics_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
739 if [ $use_info_jobs ]; then
740 ics_equal json:data-producer/v1/info-producers 4
742 ics_equal json:ei-producer/v1/eiproducers 4
745 ics_api_edp_get_producer_status 200 prod-a ENABLED
746 ics_api_edp_get_producer_status 200 prod-b ENABLED
747 ics_api_edp_get_producer_status 200 prod-c ENABLED
748 ics_api_edp_get_producer_status 200 prod-d ENABLED
750 if [ -z "$FLAT_A1_EI" ]; then
751 ics_equal json:A1-EI/v1/eitypes/type1/eijobs 0
752 ics_equal json:A1-EI/v1/eitypes/type2/eijobs 0
753 ics_equal json:A1-EI/v1/eitypes/type3/eijobs 0
754 ics_equal json:A1-EI/v1/eitypes/type4/eijobs 0
755 ics_equal json:A1-EI/v1/eitypes/type5/eijobs 0
757 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
758 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type2 0
759 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type3 0
760 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type4 0
761 ics_equal json:A1-EI/v1/eijobs?eiTypeId=type5 0
764 if [ $use_info_jobs ]; then
765 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 0
766 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 0
767 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 0
768 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 0
769 ics_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0
772 if [ $use_info_jobs ]; then
773 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
774 ics_api_edp_put_type_2 200 type101 testdata/ics/info-type-1.json
775 ics_api_edp_put_type_2 200 type102 testdata/ics/info-type-2.json
776 ics_api_edp_put_type_2 200 type103 testdata/ics/info-type-3.json
777 ics_api_edp_put_type_2 200 type104 testdata/ics/info-type-4.json
778 ics_api_edp_put_type_2 200 type105 testdata/ics/info-type-5.json
782 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
783 cr_equal 0 received_callbacks 10 30
784 cr_equal 0 received_callbacks?id=type-status1 5
785 cr_equal 0 received_callbacks?id=type-status2 5
787 cr_api_check_all_ics_subscription_events 200 0 type-status1 \
788 type101 testdata/ics/info-type-1.json REGISTERED \
789 type102 testdata/ics/info-type-2.json REGISTERED \
790 type103 testdata/ics/info-type-3.json REGISTERED \
791 type104 testdata/ics/info-type-4.json REGISTERED \
792 type105 testdata/ics/info-type-5.json REGISTERED
794 cr_api_check_all_ics_subscription_events 200 0 type-status2 \
795 type101 testdata/ics/info-type-1.json REGISTERED \
796 type102 testdata/ics/info-type-2.json REGISTERED \
797 type103 testdata/ics/info-type-3.json REGISTERED \
798 type104 testdata/ics/info-type-4.json REGISTERED \
799 type105 testdata/ics/info-type-5.json REGISTERED
802 cr_equal 0 received_callbacks 0 30
809 #### TEST COMPLETE ####
814 auto_clean_environment