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 full interfaces walkthrough"
23 #App names to include in the test when running docker, space separated list
24 DOCKER_INCLUDED_IMAGES="ICS PRODSTUB CR RICSIM CP HTTPPROXY NGW KUBEPROXY"
26 #App names to include in the test when running kubernetes, space separated list
27 KUBE_INCLUDED_IMAGES="PRODSTUB CR ICS RICSIM CP HTTPPROXY 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 $@
63 start_ics NOPROXY $SIM_GROUP/$ICS_COMPOSE_DIR/$ICS_CONFIG_FILE #Change NOPROXY to PROXY to run with http proxy
65 if [ $RUNMODE == "KUBE" ]; then
73 start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
75 if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
76 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
79 if [ "$PMS_VERSION" == "V2" ]; then
80 start_ric_simulators ricsim_g3 4 STD_2.0.0
85 CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
86 CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
88 TARGET1="$RIC_SIM_HTTPX://ricsim_g3_1:$RIC_SIM_PORT/datadelivery"
89 TARGET2="$RIC_SIM_HTTPX://ricsim_g3_2:$RIC_SIM_PORT/datadelivery"
90 TARGET3="$RIC_SIM_HTTPX://ricsim_g3_3:$RIC_SIM_PORT/datadelivery"
91 TARGET8="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery"
92 TARGET10="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery"
94 #Targets for info jobs
95 TARGET101="http://localhost:80/target" # Dummy target, no target for info data in this env...
96 TARGET102="http://localhost:80/target" # Dummy target, no target for info data in this env...
97 TARGET103="http://localhost:80/target" # Dummy target, no target for info data in this env...
98 TARGET108="http://localhost:80/target" # Dummy target, no target for info data in this env...
99 TARGET110="http://localhost:80/target" # Dummy target, no target for info data in this env...
100 TARGET150="http://localhost:80/target" # Dummy target, no target for info data in this env...
101 TARGET160="http://localhost:80/target" # Dummy target, no target for info data in this env...
103 #Status callbacks for eijobs
104 STATUS1="$CR_SERVICE_APP_PATH_0/job1-status"
105 STATUS2="$CR_SERVICE_APP_PATH_0/job2-status"
106 STATUS3="$CR_SERVICE_APP_PATH_0/job3-status"
107 STATUS8="$CR_SERVICE_APP_PATH_0/job8-status"
108 STATUS10="$CR_SERVICE_APP_PATH_0/job10-status"
110 #Status callbacks for infojobs
111 INFOSTATUS101="$CR_SERVICE_APP_PATH_0/info-job101-status"
112 INFOSTATUS102="$CR_SERVICE_APP_PATH_0/info-job102-status"
113 INFOSTATUS103="$CR_SERVICE_APP_PATH_0/info-job103-status"
114 INFOSTATUS108="$CR_SERVICE_APP_PATH_0/info-job108-status"
115 INFOSTATUS110="$CR_SERVICE_APP_PATH_0/info-job110-status"
116 INFOSTATUS150="$CR_SERVICE_APP_PATH_0/info-job150-status"
117 INFOSTATUS160="$CR_SERVICE_APP_PATH_0/info-job160-status"
119 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
120 #Type registration status callbacks
121 TYPESTATUS1="$CR_SERVICE_APP_PATH_0/type-status1"
122 TYPESTATUS2="$CR_SERVICE_APP_PATH_0/type-status2"
124 ics_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1
126 ics_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1
128 ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
130 ics_api_idc_get_subscription_ids 200 test EMPTY
132 ics_api_idc_get_subscription 200 subscription-id-1 owner1 $TYPESTATUS1
134 ics_api_idc_get_subscription 404 test
136 ics_api_idc_put_subscription 200 subscription-id-1 owner1 $TYPESTATUS1
138 ics_api_idc_put_subscription 200 subscription-id-1 owner1 $TYPESTATUS1
140 ics_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2
142 ics_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1 subscription-id-2
144 ics_api_idc_get_subscription_ids 200 owner1 subscription-id-1
146 ics_api_idc_get_subscription_ids 200 owner2 subscription-id-2
148 ics_api_idc_get_subscription 200 subscription-id-1 owner1 $TYPESTATUS1
149 ics_api_idc_get_subscription 200 subscription-id-2 owner2 $TYPESTATUS2
151 ics_api_idc_delete_subscription 204 subscription-id-2
153 ics_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1
155 ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
157 cr_equal 0 received_callbacks 1 30
158 cr_equal 0 received_callbacks?id=type-status1 1
159 cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json REGISTERED
161 ics_api_edp_delete_type_2 204 type1
163 cr_equal 0 received_callbacks 2 30
164 cr_equal 0 received_callbacks?id=type-status1 2
165 cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json DEREGISTERED
167 ics_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2
168 ics_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1 subscription-id-2
170 ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
172 cr_equal 0 received_callbacks 4 30
173 cr_equal 0 received_callbacks?id=type-status1 3
174 cr_equal 0 received_callbacks?id=type-status2 1
175 cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json REGISTERED
177 ics_api_idc_delete_subscription 204 subscription-id-2
179 ics_api_edp_delete_type_2 204 type1
181 cr_equal 0 received_callbacks 5 30
182 cr_equal 0 received_callbacks?id=type-status1 4
183 cr_equal 0 received_callbacks?id=type-status2 1
184 cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json DEREGISTERED
189 ### Setup prodstub sim to accept calls for producers, types and jobs
191 ## prod-b type1 and type2
203 ## job10 -> prod-e and prod-f
205 prodstub_arm_producer 200 prod-a
206 prodstub_arm_producer 200 prod-b
207 prodstub_arm_producer 200 prod-c
208 prodstub_arm_producer 200 prod-d
209 prodstub_arm_producer 200 prod-e
210 prodstub_arm_producer 200 prod-f
212 prodstub_arm_type 200 prod-a type1
213 prodstub_arm_type 200 prod-b type2
214 prodstub_arm_type 200 prod-b type3
215 prodstub_arm_type 200 prod-d type4
216 prodstub_arm_type 200 prod-e type6
217 prodstub_arm_type 200 prod-f type6
219 prodstub_disarm_type 200 prod-b type3
220 prodstub_arm_type 200 prod-b type1
221 prodstub_disarm_type 200 prod-b type1
224 prodstub_arm_job_create 200 prod-a job1
225 prodstub_arm_job_create 200 prod-a job2
226 prodstub_arm_job_create 200 prod-b job3
228 prodstub_arm_job_delete 200 prod-a job1
229 prodstub_arm_job_delete 200 prod-a job2
230 prodstub_arm_job_delete 200 prod-b job3
232 prodstub_arm_job_create 200 prod-b job4
233 prodstub_arm_job_create 200 prod-a job4
235 prodstub_arm_job_create 200 prod-b job6
237 prodstub_arm_job_create 200 prod-d job8
239 prodstub_arm_job_create 200 prod-e job10
240 prodstub_arm_job_create 200 prod-f job10
243 ics_api_service_status 200
245 cr_equal 0 received_callbacks 0
247 ### Initial tests - no config made
248 ### GET: type ids, types, producer ids, producers, job ids, jobs
250 ics_api_a1_get_type_ids 200 EMPTY
251 ics_api_a1_get_type 404 test-type
253 ics_api_edp_get_type_ids 200 EMPTY
254 if [ $ICS_VERSION == "V1-1" ]; then
255 ics_api_edp_get_type 404 test-type
257 ics_api_edp_get_type_2 404 test-type
260 if [ $ICS_VERSION == "V1-1" ]; then
261 ics_api_edp_get_producer_ids 200 EMPTY
262 ics_api_edp_get_producer 404 test-prod
264 ics_api_edp_get_producer_ids_2 200 NOTYPE EMPTY
265 ics_api_edp_get_producer_2 404 test-prod
267 ics_api_edp_get_producer_status 404 test-prod
269 ics_api_edp_delete_producer 404 test-prod
271 if [ -z "$FLAT_A1_EI" ]; then
272 ics_api_a1_get_job_ids 404 test-type NOWNER
273 ics_api_a1_get_job_ids 404 test-type test-owner
275 ics_api_a1_get_job 404 test-type test-job
277 ics_api_a1_get_job_status 404 test-type test-job
279 ics_api_a1_get_job_ids 200 test-type NOWNER EMPTY
280 ics_api_a1_get_job_ids 200 test-type test-owner EMPTY
282 ics_api_a1_get_job 404 test-job
284 ics_api_a1_get_job_status 404 test-job
287 if [ -z "$FLAT_A1_EI" ]; then
288 ics_api_a1_delete_job 404 test-type test-job
290 ics_api_a1_delete_job 404 test-job
293 if [ $ICS_VERSION == "V1-1" ]; then
294 ics_api_edp_get_producer_jobs 404 test-prod
296 ics_api_edp_get_producer_jobs_2 404 test-prod
299 if [ $ICS_VERSION == "V1-2" ]; then
300 ics_api_edp_get_type_2 404 test-type
301 ics_api_edp_delete_type_2 404 test-type
304 ### Setup of producer/job and testing apis ###
307 if [ $ICS_VERSION == "V1-1" ]; then
308 ics_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
309 ics_api_edp_put_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
312 ics_api_edp_get_type_ids 200 EMPTY
313 ics_api_edp_get_type_2 404 type1
314 ics_api_edp_put_producer_2 404 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
316 # Create type, delete and create again
317 ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
318 ics_api_edp_get_type_2 200 type1
319 ics_api_edp_get_type_ids 200 type1
320 ics_api_edp_delete_type_2 204 type1
321 ics_api_edp_get_type_2 404 type1
322 ics_api_edp_get_type_ids 200 EMPTY
323 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
324 ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
326 ics_api_edp_put_type_2 201 type1 testdata/ics/ei-type-1.json
328 ics_api_edp_get_type_ids 200 type1
329 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
330 ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
332 ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
335 ics_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
336 ics_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
338 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
339 cr_equal 0 received_callbacks 3 30
340 cr_equal 0 received_callbacks?id=type-status1 3
341 cr_api_check_all_ics_subscription_events 200 0 type-status1 type1 testdata/ics/ei-type-1.json REGISTERED type1 testdata/ics/ei-type-1.json DEREGISTERED type1 testdata/ics/ei-type-1.json REGISTERED
343 cr_equal 0 received_callbacks 0
348 ics_api_a1_get_type_ids 200 type1
349 if [ -z "$FLAT_A1_EI" ]; then
350 ics_api_a1_get_type 200 type1 testdata/ics/ei-type-1.json
352 ics_api_a1_get_type 200 type1 testdata/ics/empty-type.json
355 ics_api_edp_get_type_ids 200 type1
356 if [ $ICS_VERSION == "V1-1" ]; then
357 ics_api_edp_get_type 200 type1 testdata/ics/ei-type-1.json prod-a
359 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
360 ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
362 ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
366 if [ $ICS_VERSION == "V1-1" ]; then
367 ics_api_edp_get_producer_ids 200 prod-a
369 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a
370 ics_api_edp_get_producer_ids_2 200 type1 prod-a
371 ics_api_edp_get_producer_ids_2 200 type2 EMPTY
374 if [ $ICS_VERSION == "V1-1" ]; then
375 ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
377 ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
380 ics_api_edp_get_producer_status 200 prod-a ENABLED
382 ics_api_a1_get_job_ids 200 type1 NOWNER EMPTY
383 ics_api_a1_get_job_ids 200 type1 test-owner EMPTY
385 if [ -z "$FLAT_A1_EI" ]; then
386 ics_api_a1_get_job 404 type1 test-job
388 ics_api_a1_get_job_status 404 type1 test-job
390 ics_api_a1_get_job 404 test-job
392 ics_api_a1_get_job_status 404 test-job
394 if [ $ICS_VERSION == "V1-1" ]; then
395 ics_api_edp_get_producer_jobs 200 prod-a EMPTY
397 ics_api_edp_get_producer_jobs_2 200 prod-a EMPTY
400 ## Create a job for prod-a
402 if [ -z "$FLAT_A1_EI" ]; then
403 ics_api_a1_put_job 201 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
405 ics_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
408 # Check the job data in the producer
409 if [ $ICS_VERSION == "V1-1" ]; then
410 prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
412 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
413 prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
415 prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
419 ics_api_a1_get_job_ids 200 type1 NOWNER job1
420 ics_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
422 if [ ! -z "$FLAT_A1_EI" ]; then
423 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1
426 if [ -z "$FLAT_A1_EI" ]; then
427 ics_api_a1_get_job 200 type1 job1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
429 ics_api_a1_get_job_status 200 type1 job1 ENABLED
431 ics_api_a1_get_job 200 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ics/job-template.json
433 ics_api_a1_get_job_status 200 job1 ENABLED
436 prodstub_equal create/prod-a/job1 1
438 if [ $ICS_VERSION == "V1-1" ]; then
439 ics_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
441 ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json
444 ## Create a second job for prod-a
446 if [ -z "$FLAT_A1_EI" ]; then
447 ics_api_a1_put_job 201 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
449 ics_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
452 # Check the job data in the producer
453 if [ $ICS_VERSION == "V1-1" ]; then
454 prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
456 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
457 prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
459 prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
462 ics_api_a1_get_job_ids 200 type1 NOWNER job1 job2
463 ics_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
464 ics_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2
465 if [ ! -z "$FLAT_A1_EI" ]; then
466 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
469 if [ -z "$FLAT_A1_EI" ]; then
470 ics_api_a1_get_job 200 type1 job2 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
472 ics_api_a1_get_job_status 200 type1 job2 ENABLED
474 ics_api_a1_get_job 200 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ics/job-template.json
476 ics_api_a1_get_job_status 200 job2 ENABLED
479 prodstub_equal create/prod-a/job2 1
481 if [ $ICS_VERSION == "V1-1" ]; then
482 ics_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
484 ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
488 if [ $ICS_VERSION == "V1-1" ]; then
489 ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
491 ics_api_edp_put_type_2 201 type2 testdata/ics/ei-type-2.json
492 ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
493 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
494 cr_equal 0 received_callbacks 4 30
495 cr_equal 0 received_callbacks?id=type-status1 4
496 cr_api_check_all_ics_subscription_events 200 0 type-status1 type2 testdata/ics/ei-type-2.json REGISTERED
498 cr_equal 0 received_callbacks 0
503 ics_api_a1_get_type_ids 200 type1 type2
504 if [ -z "$FLAT_A1_EI" ]; then
505 ics_api_a1_get_type 200 type1 testdata/ics/ei-type-1.json
506 ics_api_a1_get_type 200 type2 testdata/ics/ei-type-2.json
508 ics_api_a1_get_type 200 type1 testdata/ics/empty-type.json
509 ics_api_a1_get_type 200 type2 testdata/ics/empty-type.json
512 ics_api_edp_get_type_ids 200 type1 type2
513 if [ $ICS_VERSION == "V1-1" ]; then
514 ics_api_edp_get_type 200 type1 testdata/ics/ei-type-1.json prod-a
515 ics_api_edp_get_type 200 type2 testdata/ics/ei-type-2.json prod-b
517 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then
518 ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json testdata/ics/info-type-info.json
520 ics_api_edp_get_type_2 200 type1 testdata/ics/ei-type-1.json
522 ics_api_edp_get_type_2 200 type2 testdata/ics/ei-type-2.json
525 if [ $ICS_VERSION == "V1-1" ]; then
526 ics_api_edp_get_producer_ids 200 prod-a prod-b
528 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b
531 if [ $ICS_VERSION == "V1-1" ]; then
532 ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
533 ics_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
535 ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
536 ics_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
539 ics_api_edp_get_producer_status 200 prod-b ENABLED
541 ## Create job for prod-b
543 if [ -z "$FLAT_A1_EI" ]; then
544 ics_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
546 ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
549 prodstub_equal create/prod-b/job3 1
551 # Check the job data in the producer
552 if [ $ICS_VERSION == "V1-1" ]; then
553 prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
555 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
556 prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
558 prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
562 ics_api_a1_get_job_ids 200 type1 NOWNER job1 job2
563 ics_api_a1_get_job_ids 200 type2 NOWNER job3
564 ics_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1
565 ics_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2
566 ics_api_a1_get_job_ids 200 type2 ricsim_g3_3 job3
568 if [ -z "$FLAT_A1_EI" ]; then
569 ics_api_a1_get_job 200 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
571 ics_api_a1_get_job_status 200 type2 job3 ENABLED
573 ics_api_a1_get_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
575 ics_api_a1_get_job_status 200 job3 ENABLED
578 if [ $ICS_VERSION == "V1-1" ]; then
579 ics_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
580 ics_api_edp_get_producer_jobs 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
582 ics_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ics/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ics/job-template.json
583 ics_api_edp_get_producer_jobs_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
586 ## Setup prod-c (no types)
587 if [ $ICS_VERSION == "V1-1" ]; then
588 ics_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE
590 ics_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE
593 if [ $ICS_VERSION == "V1-1" ]; then
594 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
596 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
599 if [ $ICS_VERSION == "V1-1" ]; then
600 ics_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ics/ei-type-1.json
601 ics_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
602 ics_api_edp_get_producer 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY
604 ics_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
605 ics_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
606 ics_api_edp_get_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY
609 ics_api_edp_get_producer_status 200 prod-c ENABLED
612 ## Delete job3 and prod-b and re-create if different order
614 # Delete job then producer
615 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
616 if [ $ICS_VERSION == "V1-1" ]; then
617 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
619 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
622 if [ -z "$FLAT_A1_EI" ]; then
623 ics_api_a1_delete_job 204 type2 job3
625 ics_api_a1_delete_job 204 job3
628 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
629 if [ $ICS_VERSION == "V1-1" ]; then
630 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
632 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
635 ics_api_edp_delete_producer 204 prod-b
637 ics_api_edp_get_producer_status 404 prod-b
639 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2
640 if [ $ICS_VERSION == "V1-1" ]; then
641 ics_api_edp_get_producer_ids 200 prod-a prod-c
643 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c
646 prodstub_equal delete/prod-b/job3 1
648 if [ -z "$FLAT_A1_EI" ]; then
649 ics_api_a1_put_job 404 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template.json
651 if [ $ICS_VERSION == "V1-1" ]; then
652 ics_api_a1_put_job 404 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
654 ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template.json
655 ics_api_a1_get_job_status 200 job3 DISABLED
659 # Put producer then job
660 if [ $ICS_VERSION == "V1-1" ]; then
661 ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
663 ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
666 ics_api_edp_get_producer_status 200 prod-b ENABLED
668 if [ -z "$FLAT_A1_EI" ]; then
669 ics_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
670 ics_api_a1_get_job_status 200 type2 job3 ENABLED
672 if [ $ICS_VERSION == "V1-1" ]; then
673 ics_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template2.json
675 ics_api_a1_put_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ics/job-template2.json
677 ics_api_a1_get_job_status 200 job3 ENABLED
680 if [ $ICS_VERSION == "V1-1" ]; then
681 prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
683 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
684 prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
686 prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
690 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
691 if [ $ICS_VERSION == "V1-1" ]; then
692 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c
694 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c
697 if [ $ICS_VERSION == "V1-1" ]; then
698 prodstub_equal create/prod-b/job3 2
700 prodstub_equal create/prod-b/job3 3
702 prodstub_equal delete/prod-b/job3 1
704 # Delete only the producer
705 ics_api_edp_delete_producer 204 prod-b
707 ics_api_edp_get_producer_status 404 prod-b
709 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3
710 if [ $ICS_VERSION == "V1-1" ]; then
711 ics_api_edp_get_producer_ids 200 prod-a prod-c
713 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c
716 if [ -z "$FLAT_A1_EI" ]; then
717 ics_api_a1_get_job_status 200 type2 job3 DISABLED
719 ics_api_a1_get_job_status 200 job3 DISABLED
722 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
723 cr_equal 0 received_callbacks 5 30
724 cr_equal 0 received_callbacks?id=type-status1 4
725 cr_equal 0 received_callbacks?id=job3-status 1
726 cr_api_check_all_ics_events 200 0 job3-status DISABLED
728 cr_equal 0 received_callbacks 1 30
729 cr_equal 0 received_callbacks?id=job3-status 1
730 cr_api_check_all_ics_events 200 0 job3-status DISABLED
733 # Re-create the producer
734 if [ $ICS_VERSION == "V1-1" ]; then
735 ics_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ics/ei-type-2.json
737 ics_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2
740 ics_api_edp_get_producer_status 200 prod-b ENABLED
742 if [ -z "$FLAT_A1_EI" ]; then
743 ics_api_a1_get_job_status 200 type2 job3 ENABLED
745 ics_api_a1_get_job_status 200 job3 ENABLED
748 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
749 cr_equal 0 received_callbacks 6 30
750 cr_equal 0 received_callbacks?id=type-status1 4
751 cr_equal 0 received_callbacks?id=job3-status 2
752 cr_api_check_all_ics_events 200 0 job3-status ENABLED
754 cr_equal 0 received_callbacks 2 30
755 cr_equal 0 received_callbacks?id=job3-status 2
756 cr_api_check_all_ics_events 200 0 job3-status ENABLED
759 if [ $ICS_VERSION == "V1-1" ]; then
760 prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
762 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
763 prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
765 prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ics/job-template2.json
770 if [ $ICS_VERSION == "V1-1" ]; then
771 ics_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json
773 ics_api_edp_put_type_2 201 type4 testdata/ics/ei-type-4.json
774 ics_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4
777 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
778 cr_equal 0 received_callbacks 7 30
779 cr_equal 0 received_callbacks?id=type-status1 5
780 cr_api_check_all_ics_subscription_events 200 0 type-status1 type4 testdata/ics/ei-type-4.json REGISTERED
783 ics_api_a1_get_job_ids 200 type4 NOWNER EMPTY
785 if [ -z "$FLAT_A1_EI" ]; then
786 ics_api_a1_put_job 201 type4 job8 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
788 ics_api_a1_put_job 201 job8 type4 $TARGET8 ricsim_g3_4 $STATUS8 testdata/ics/job-template.json
791 if [ $ICS_VERSION == "V1-1" ]; then
792 prodstub_check_jobdata 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
794 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
795 prodstub_check_jobdata_2 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
797 prodstub_check_jobdata_3 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ics/job-template.json
801 prodstub_equal create/prod-d/job8 1
802 prodstub_equal delete/prod-d/job8 0
804 ics_api_a1_get_job_ids 200 type4 NOWNER job8
806 if [ -z "$FLAT_A1_EI" ]; then
807 ics_api_a1_get_job_status 200 type4 job8 ENABLED
809 ics_api_a1_get_job_status 200 job8 ENABLED
812 # Re-PUT the producer with zero types
813 if [ $ICS_VERSION == "V1-1" ]; then
814 ics_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE
816 ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE
819 if [ -z "$FLAT_A1_EI" ]; then
820 ics_api_a1_get_job_ids 404 type4 NOWNER
822 ics_api_a1_get_job_ids 200 type4 NOWNER job8
823 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8
826 if [ -z "$FLAT_A1_EI" ]; then
827 ics_api_a1_get_job_status 200 type4 job8 DISABLED
829 ics_api_a1_get_job_status 200 job8 DISABLED
832 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
833 cr_equal 0 received_callbacks 8 30
834 cr_equal 0 received_callbacks?id=type-status1 5
835 cr_equal 0 received_callbacks?id=job8-status 1
836 cr_api_check_all_ics_events 200 0 job8-status DISABLED
838 cr_equal 0 received_callbacks 3 30
839 cr_equal 0 received_callbacks?id=job8-status 1
840 cr_api_check_all_ics_events 200 0 job8-status DISABLED
843 prodstub_equal create/prod-d/job8 1
844 prodstub_equal delete/prod-d/job8 0
847 if [ $ICS_VERSION == "V1-1" ]; then
848 ics_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ics/ei-type-4.json
850 ics_api_edp_put_type_2 200 type4 testdata/ics/ei-type-4.json
851 ics_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4
854 if [ -z "$FLAT_A1_EI" ]; then
855 ics_api_a1_get_job_ids 404 type4 NOWNER
857 ics_api_a1_get_job_ids 200 type4 NOWNER job8
858 ics_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8
861 if [ -z "$FLAT_A1_EI" ]; then
862 ics_api_a1_get_job_status 200 type4 job8 ENABLED
864 ics_api_a1_get_job_status 200 job8 ENABLED
867 ics_api_edp_get_producer_status 200 prod-a ENABLED
868 ics_api_edp_get_producer_status 200 prod-b ENABLED
869 ics_api_edp_get_producer_status 200 prod-c ENABLED
870 ics_api_edp_get_producer_status 200 prod-d ENABLED
872 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
873 cr_equal 0 received_callbacks 10 30
874 cr_equal 0 received_callbacks?id=type-status1 6
875 cr_api_check_all_ics_subscription_events 200 0 type-status1 type4 testdata/ics/ei-type-4.json REGISTERED
877 cr_equal 0 received_callbacks?id=job8-status 2
878 cr_api_check_all_ics_events 200 0 job8-status ENABLED
880 cr_equal 0 received_callbacks 4 30
881 cr_equal 0 received_callbacks?id=job8-status 2
882 cr_api_check_all_ics_events 200 0 job8-status ENABLED
885 prodstub_equal create/prod-d/job8 2
886 prodstub_equal delete/prod-d/job8 0
889 if [ $ICS_VERSION == "V1-1" ]; then
890 ics_api_edp_put_producer 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6 testdata/ics/ei-type-6.json
892 ics_api_edp_put_type_2 201 type6 testdata/ics/ei-type-6.json
893 ics_api_edp_put_producer_2 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6
896 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
897 cr_equal 0 received_callbacks 11 30
898 cr_equal 0 received_callbacks?id=type-status1 7
899 cr_api_check_all_ics_subscription_events 200 0 type-status1 type6 testdata/ics/ei-type-6.json REGISTERED
902 ics_api_a1_get_job_ids 200 type6 NOWNER EMPTY
904 if [ -z "$FLAT_A1_EI" ]; then
905 ics_api_a1_put_job 201 type6 job10 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
907 ics_api_a1_put_job 201 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ics/job-template.json
910 if [ $ICS_VERSION == "V1-1" ]; then
911 prodstub_check_jobdata 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
913 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
914 prodstub_check_jobdata_2 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
916 prodstub_check_jobdata_3 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
920 prodstub_equal create/prod-e/job10 1
921 prodstub_equal delete/prod-e/job10 0
923 ics_api_a1_get_job_ids 200 type6 NOWNER job10
925 if [ -z "$FLAT_A1_EI" ]; then
926 ics_api_a1_get_job_status 200 type6 job10 ENABLED
928 ics_api_a1_get_job_status 200 job10 ENABLED
932 if [ $ICS_VERSION == "V1-1" ]; then
933 ics_api_edp_put_producer 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6 testdata/ics/ei-type-6.json
935 ics_api_edp_put_type_2 200 type6 testdata/ics/ei-type-6.json
936 ics_api_edp_put_producer_2 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6
939 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
940 cr_equal 0 received_callbacks 12 30
941 cr_equal 0 received_callbacks?id=type-status1 8
942 cr_api_check_all_ics_subscription_events 200 0 type-status1 type6 testdata/ics/ei-type-6.json REGISTERED
945 ics_api_a1_get_job_ids 200 type6 NOWNER job10
947 if [ $ICS_VERSION == "V1-1" ]; then
948 prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
950 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
951 prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
953 prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template.json
957 prodstub_equal create/prod-f/job10 1
958 prodstub_equal delete/prod-f/job10 0
960 ics_api_a1_get_job_ids 200 type6 NOWNER job10
962 if [ -z "$FLAT_A1_EI" ]; then
963 ics_api_a1_get_job_status 200 type6 job10 ENABLED
965 ics_api_a1_get_job_status 200 job10 ENABLED
968 ## Status updates prod-a and jobs
970 if [ $ICS_VERSION == "V1-1" ]; then
971 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
973 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
976 ics_api_edp_get_producer_status 200 prod-a ENABLED
977 ics_api_edp_get_producer_status 200 prod-b ENABLED
978 ics_api_edp_get_producer_status 200 prod-c ENABLED
979 ics_api_edp_get_producer_status 200 prod-d ENABLED
980 ics_api_edp_get_producer_status 200 prod-e ENABLED
981 ics_api_edp_get_producer_status 200 prod-f ENABLED
983 # Arm producer prod-a for supervision failure
984 prodstub_arm_producer 200 prod-a 400
986 # Wait for producer prod-a to go disabled
987 ics_api_edp_get_producer_status 200 prod-a DISABLED 360
989 if [ $ICS_VERSION == "V1-1" ]; then
990 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
992 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
995 ics_api_edp_get_producer_status 200 prod-a DISABLED
996 ics_api_edp_get_producer_status 200 prod-b ENABLED
997 ics_api_edp_get_producer_status 200 prod-c ENABLED
998 ics_api_edp_get_producer_status 200 prod-d ENABLED
999 ics_api_edp_get_producer_status 200 prod-e ENABLED
1000 ics_api_edp_get_producer_status 200 prod-f ENABLED
1003 if [ -z "$FLAT_A1_EI" ]; then
1004 ics_api_a1_get_job_status 200 type1 job1 ENABLED
1005 ics_api_a1_get_job_status 200 type1 job2 ENABLED
1006 ics_api_a1_get_job_status 200 type2 job3 ENABLED
1007 ics_api_a1_get_job_status 200 type4 job8 ENABLED
1008 ics_api_a1_get_job_status 200 type6 job10 ENABLED
1010 ics_api_a1_get_job_status 200 job1 ENABLED
1011 ics_api_a1_get_job_status 200 job2 ENABLED
1012 ics_api_a1_get_job_status 200 job3 ENABLED
1013 ics_api_a1_get_job_status 200 job8 ENABLED
1014 ics_api_a1_get_job_status 200 job10 ENABLED
1017 # Arm producer prod-a for supervision
1018 prodstub_arm_producer 200 prod-a 200
1020 # Wait for producer prod-a to go enabled
1021 ics_api_edp_get_producer_status 200 prod-a ENABLED 360
1023 if [ $ICS_VERSION == "V1-1" ]; then
1024 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
1026 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
1029 ics_api_edp_get_producer_status 200 prod-a ENABLED
1030 ics_api_edp_get_producer_status 200 prod-b ENABLED
1031 ics_api_edp_get_producer_status 200 prod-c ENABLED
1032 ics_api_edp_get_producer_status 200 prod-d ENABLED
1033 ics_api_edp_get_producer_status 200 prod-e ENABLED
1034 ics_api_edp_get_producer_status 200 prod-f ENABLED
1036 if [ -z "$FLAT_A1_EI" ]; then
1037 ics_api_a1_get_job_status 200 type1 job1 ENABLED
1038 ics_api_a1_get_job_status 200 type1 job2 ENABLED
1039 ics_api_a1_get_job_status 200 type2 job3 ENABLED
1040 ics_api_a1_get_job_status 200 type4 job8 ENABLED
1041 ics_api_a1_get_job_status 200 type6 job10 ENABLED
1043 ics_api_a1_get_job_status 200 job1 ENABLED
1044 ics_api_a1_get_job_status 200 job2 ENABLED
1045 ics_api_a1_get_job_status 200 job3 ENABLED
1046 ics_api_a1_get_job_status 200 job8 ENABLED
1047 ics_api_a1_get_job_status 200 job10 ENABLED
1050 # Arm producer prod-a for supervision failure
1051 prodstub_arm_producer 200 prod-a 400
1053 # Wait for producer prod-a to go disabled
1054 ics_api_edp_get_producer_status 200 prod-a DISABLED 360
1056 if [ $ICS_VERSION == "V1-1" ]; then
1057 ics_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f
1059 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f
1062 ics_api_edp_get_producer_status 200 prod-a DISABLED
1063 ics_api_edp_get_producer_status 200 prod-b ENABLED
1064 ics_api_edp_get_producer_status 200 prod-c ENABLED
1065 ics_api_edp_get_producer_status 200 prod-d ENABLED
1066 ics_api_edp_get_producer_status 200 prod-e ENABLED
1067 ics_api_edp_get_producer_status 200 prod-f ENABLED
1069 if [ -z "$FLAT_A1_EI" ]; then
1070 ics_api_a1_get_job_status 200 type1 job1 ENABLED
1071 ics_api_a1_get_job_status 200 type1 job2 ENABLED
1072 ics_api_a1_get_job_status 200 type2 job3 ENABLED
1073 ics_api_a1_get_job_status 200 type4 job8 ENABLED
1074 ics_api_a1_get_job_status 200 type6 job10 ENABLED
1076 ics_api_a1_get_job_status 200 job1 ENABLED
1077 ics_api_a1_get_job_status 200 job2 ENABLED
1078 ics_api_a1_get_job_status 200 job3 ENABLED
1079 ics_api_a1_get_job_status 200 job8 ENABLED
1080 ics_api_a1_get_job_status 200 job10 ENABLED
1083 # Wait for producer prod-a to be removed
1084 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
1085 ics_equal json:data-producer/v1/info-producers 5 1000
1087 ics_equal json:ei-producer/v1/eiproducers 5 1000
1090 if [ $ICS_VERSION == "V1-1" ]; then
1091 ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
1093 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
1097 ics_api_edp_get_producer_status 404 prod-a
1098 ics_api_edp_get_producer_status 200 prod-b ENABLED
1099 ics_api_edp_get_producer_status 200 prod-c ENABLED
1100 ics_api_edp_get_producer_status 200 prod-d ENABLED
1101 ics_api_edp_get_producer_status 200 prod-e ENABLED
1102 ics_api_edp_get_producer_status 200 prod-f ENABLED
1104 if [ -z "$FLAT_A1_EI" ]; then
1105 ics_api_a1_get_job_status 200 type1 job1 DISABLED
1106 ics_api_a1_get_job_status 200 type1 job2 DISABLED
1107 ics_api_a1_get_job_status 200 type2 job3 ENABLED
1108 ics_api_a1_get_job_status 200 type4 job8 ENABLED
1109 ics_api_a1_get_job_status 200 type6 job10 ENABLED
1111 ics_api_a1_get_job_status 200 job1 DISABLED
1112 ics_api_a1_get_job_status 200 job2 DISABLED
1113 ics_api_a1_get_job_status 200 job3 ENABLED
1114 ics_api_a1_get_job_status 200 job8 ENABLED
1115 ics_api_a1_get_job_status 200 job10 ENABLED
1118 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1119 cr_equal 0 received_callbacks 14 30
1121 cr_equal 0 received_callbacks 6 30
1124 cr_equal 0 received_callbacks?id=job1-status 1
1125 cr_equal 0 received_callbacks?id=job2-status 1
1127 cr_api_check_all_ics_events 200 0 job1-status DISABLED
1128 cr_api_check_all_ics_events 200 0 job2-status DISABLED
1131 # Arm producer prod-e for supervision failure
1132 prodstub_arm_producer 200 prod-e 400
1134 ics_api_edp_get_producer_status 200 prod-e DISABLED 1000
1136 if [ $ICS_VERSION == "V1-1" ]; then
1137 ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
1139 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
1142 ics_api_edp_get_producer_status 404 prod-a
1143 ics_api_edp_get_producer_status 200 prod-b ENABLED
1144 ics_api_edp_get_producer_status 200 prod-c ENABLED
1145 ics_api_edp_get_producer_status 200 prod-d ENABLED
1146 ics_api_edp_get_producer_status 200 prod-e DISABLED
1147 ics_api_edp_get_producer_status 200 prod-f ENABLED
1149 if [ -z "$FLAT_A1_EI" ]; then
1150 ics_api_a1_get_job_status 200 type1 job1 DISABLED
1151 ics_api_a1_get_job_status 200 type1 job2 DISABLED
1152 ics_api_a1_get_job_status 200 type2 job3 ENABLED
1153 ics_api_a1_get_job_status 200 type4 job8 ENABLED
1154 ics_api_a1_get_job_status 200 type6 job10 ENABLED
1156 ics_api_a1_get_job_status 200 job1 DISABLED
1157 ics_api_a1_get_job_status 200 job2 DISABLED
1158 ics_api_a1_get_job_status 200 job3 ENABLED
1159 ics_api_a1_get_job_status 200 job8 ENABLED
1160 ics_api_a1_get_job_status 200 job10 ENABLED
1163 #Disable create for job10 in prod-e
1164 prodstub_arm_job_create 200 prod-e job10 400
1166 #Update tjob 10 - only prod-f will be updated
1167 if [ -z "$FLAT_A1_EI" ]; then
1168 ics_api_a1_put_job 200 type6 job10 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
1170 ics_api_a1_put_job 200 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ics/job-template2.json
1172 #Reset producer and job responses
1173 prodstub_arm_producer 200 prod-e 200
1174 prodstub_arm_job_create 200 prod-e job10 200
1176 ics_api_edp_get_producer_status 200 prod-e ENABLED 360
1178 if [ $ICS_VERSION == "V1-1" ]; then
1179 ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f
1181 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f
1184 #Wait for job to be updated
1187 if [ $ICS_VERSION == "V1-1" ]; then
1188 prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
1190 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
1191 prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
1193 prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ics/job-template2.json
1197 prodstub_arm_producer 200 prod-f 400
1199 ics_api_edp_get_producer_status 200 prod-f DISABLED 360
1201 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
1202 ics_equal json:data-producer/v1/info-producers 4 1000
1204 ics_equal json:ei-producer/v1/eiproducers 4 1000
1207 if [ $ICS_VERSION == "V1-1" ]; then
1208 ics_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e
1210 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e
1213 ics_api_edp_get_producer_status 404 prod-a
1214 ics_api_edp_get_producer_status 200 prod-b ENABLED
1215 ics_api_edp_get_producer_status 200 prod-c ENABLED
1216 ics_api_edp_get_producer_status 200 prod-d ENABLED
1217 ics_api_edp_get_producer_status 200 prod-e ENABLED
1218 ics_api_edp_get_producer_status 404 prod-f
1220 if [ -z "$FLAT_A1_EI" ]; then
1221 ics_api_a1_get_job_status 200 type1 job1 DISABLED
1222 ics_api_a1_get_job_status 200 type1 job2 DISABLED
1223 ics_api_a1_get_job_status 200 type2 job3 ENABLED
1224 ics_api_a1_get_job_status 200 type4 job8 ENABLED
1225 ics_api_a1_get_job_status 200 type6 job10 ENABLED
1227 ics_api_a1_get_job_status 200 job1 DISABLED
1228 ics_api_a1_get_job_status 200 job2 DISABLED
1229 ics_api_a1_get_job_status 200 job3 ENABLED
1230 ics_api_a1_get_job_status 200 job8 ENABLED
1231 ics_api_a1_get_job_status 200 job10 ENABLED
1234 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1235 cr_equal 0 received_callbacks 14 30
1237 cr_equal 0 received_callbacks 6 30
1241 if [[ "$ICS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then
1243 # End test if info types is not impl in tested version
1248 #### TEST COMPLETE ####
1252 auto_clean_environment
1256 ############################################
1257 # Test of info types
1258 ############################################
1260 ### Setup prodstub sim to accept calls for producers, info types and jobs
1262 ## prod-ib type101 and type102
1267 ## prod-ig type150 (configured later)
1268 ## prod-ig type160 (configured later)
1270 ## job101 -> prod-ia
1271 ## job102 -> prod-ia
1272 ## job103 -> prod-ib
1273 ## job104 -> prod-ia
1274 ## job106 -> prod-ib
1275 ## job108 -> prod-id
1276 ## job110 -> prod-ie and prod-if
1277 ## job150 -> prod-ig (configured later)
1279 prodstub_arm_producer 200 prod-ia
1280 prodstub_arm_producer 200 prod-ib
1281 prodstub_arm_producer 200 prod-ic
1282 prodstub_arm_producer 200 prod-id
1283 prodstub_arm_producer 200 prod-ie
1284 prodstub_arm_producer 200 prod-if
1286 prodstub_arm_type 200 prod-ia type101
1287 prodstub_arm_type 200 prod-ib type102
1288 prodstub_arm_type 200 prod-ib type103
1289 prodstub_arm_type 200 prod-id type104
1290 prodstub_arm_type 200 prod-ie type106
1291 prodstub_arm_type 200 prod-if type106
1293 prodstub_disarm_type 200 prod-ib type103
1294 prodstub_arm_type 200 prod-ib type101
1295 prodstub_disarm_type 200 prod-ib type101
1298 prodstub_arm_job_create 200 prod-ia job101
1299 prodstub_arm_job_create 200 prod-ia job102
1300 prodstub_arm_job_create 200 prod-ib job103
1302 prodstub_arm_job_delete 200 prod-ia job101
1303 prodstub_arm_job_delete 200 prod-ia job102
1304 prodstub_arm_job_delete 200 prod-ib job103
1306 prodstub_arm_job_create 200 prod-ib job104
1307 prodstub_arm_job_create 200 prod-ia job104
1309 prodstub_arm_job_create 200 prod-ib job106
1311 prodstub_arm_job_create 200 prod-id job108
1313 prodstub_arm_job_create 200 prod-ie job110
1314 prodstub_arm_job_create 200 prod-if job110
1317 # NOTE: types, jobs and producers are still present related to eitypes
1320 ### Initial tests - no config made
1321 ### GET: type ids, types, producer ids, producers, job ids, jobs
1323 ics_api_idc_get_type_ids 200 type1 type2 type4 type6
1324 ics_api_idc_get_type 404 test-type
1326 ics_api_edp_get_type_ids 200 type1 type2 type4 type6
1327 ics_api_edp_get_type_2 404 test-type
1329 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e
1330 ics_api_edp_get_producer_2 404 test-prod
1331 ics_api_edp_get_producer_status 404 test-prod
1333 ics_api_edp_delete_producer 404 test-prod
1335 ics_api_idc_get_job_ids 200 test-type NOWNER EMPTY
1336 ics_api_idc_get_job_ids 200 test-type test-owner EMPTY
1338 ics_api_idc_get_job 404 test-job
1340 ics_api_idc_get_job_status2 404 test-job
1342 ics_api_idc_delete_job 404 test-job
1344 ics_api_edp_get_producer_jobs_2 404 test-prod
1346 ics_api_edp_get_type_2 404 test-type
1347 ics_api_edp_delete_type_2 404 test-type
1349 ### Setup of producer/job and testing apis ###
1352 ics_api_edp_get_type_ids 200 type1 type2 type4 type6
1353 ics_api_edp_get_type_2 404 type101
1354 ics_api_edp_put_producer_2 404 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
1356 # Create type, delete and create again
1357 ics_api_edp_put_type_2 201 type101 testdata/ics/info-type-1.json
1358 ics_api_edp_get_type_2 200 type101
1359 ics_api_edp_get_type_ids 200 type101 type1 type2 type4 type6
1360 ics_api_edp_delete_type_2 204 type101
1361 ics_api_edp_get_type_2 404 type101
1362 ics_api_edp_get_type_ids 200 type1 type2 type4 type6
1363 ics_api_edp_put_type_2 201 type101 testdata/ics/info-type-1.json
1364 ics_api_edp_get_type_ids 200 type101 type1 type2 type4 type6
1365 ics_api_edp_get_type_2 200 type101 testdata/ics/info-type-1.json
1367 ics_api_edp_put_producer_2 201 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
1368 ics_api_edp_put_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
1370 if [[ "$ICS_FEATURE_LEVEL" == *"RESP_CODE_CHANGE_1" ]]; then
1371 ics_api_edp_delete_type_2 409 type101
1373 ics_api_edp_delete_type_2 406 type101
1376 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1377 cr_equal 0 received_callbacks 17 30
1378 cr_equal 0 received_callbacks?id=type-status1 11
1379 cr_api_check_all_ics_subscription_events 200 0 type-status1 type101 testdata/ics/info-type-1.json REGISTERED type101 testdata/ics/info-type-1.json DEREGISTERED type101 testdata/ics/info-type-1.json REGISTERED
1381 cr_equal 0 received_callbacks 6
1384 ics_api_edp_get_type_ids 200 type101 type1 type2 type4 type6
1385 ics_api_edp_get_type_2 200 type101 testdata/ics/info-type-1.json
1387 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-b prod-c prod-d prod-e
1388 ics_api_edp_get_producer_ids_2 200 type101 prod-ia
1389 ics_api_edp_get_producer_ids_2 200 type102 EMPTY
1391 ics_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
1393 ics_api_edp_get_producer_status 200 prod-ia ENABLED
1395 ics_api_idc_get_job_ids 200 type101 NOWNER EMPTY
1396 ics_api_idc_get_job_ids 200 type101 test-owner EMPTY
1398 ics_api_idc_get_job 404 test-job
1400 ics_api_idc_get_job_status2 404 test-job
1401 ics_api_edp_get_producer_jobs_2 200 prod-ia EMPTY
1403 ## Create a job for prod-ia
1405 ics_api_idc_put_job 201 job101 type101 $TARGET101 info-owner-1 $INFOSTATUS101 testdata/ics/job-template.json VALIDATE
1407 # Check the job data in the producer
1408 prodstub_check_jobdata_3 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ics/job-template.json
1410 ics_api_idc_get_job_ids 200 type101 NOWNER job101
1411 ics_api_idc_get_job_ids 200 type101 info-owner-1 job101
1413 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job1 job2 job3 job8 job10
1415 ics_api_idc_get_job 200 job101 type101 $TARGET101 info-owner-1 $INFOSTATUS101 testdata/ics/job-template.json
1417 ics_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia
1419 prodstub_equal create/prod-ia/job101 1
1421 ics_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ics/job-template.json
1423 ## Create a second job for prod-ia
1425 ics_api_idc_put_job 201 job102 type101 $TARGET102 info-owner-2 $INFOSTATUS102 testdata/ics/job-template.json VALIDATE
1427 # Check the job data in the producer
1428 prodstub_check_jobdata_3 200 prod-ia job102 type101 $TARGET102 info-owner-2 testdata/ics/job-template.json
1429 ics_api_idc_get_job_ids 200 type101 NOWNER job101 job102
1430 ics_api_idc_get_job_ids 200 type101 info-owner-1 job101
1431 ics_api_idc_get_job_ids 200 type101 info-owner-2 job102
1432 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10
1434 ics_api_idc_get_job 200 job102 type101 $TARGET102 info-owner-2 $INFOSTATUS102 testdata/ics/job-template.json
1436 ics_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia
1438 prodstub_equal create/prod-ia/job102 1
1440 ics_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ics/job-template.json job102 type101 $TARGET102 info-owner-2 testdata/ics/job-template.json
1444 ics_api_edp_put_type_2 201 type102 testdata/ics/info-type-2.json
1445 ics_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
1447 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1448 cr_equal 0 received_callbacks 18 30
1449 cr_equal 0 received_callbacks?id=type-status1 12
1450 cr_api_check_all_ics_subscription_events 200 0 type-status1 type102 testdata/ics/info-type-2.json REGISTERED
1452 cr_equal 0 received_callbacks 6
1455 ics_api_idc_get_type_ids 200 type101 type102 type1 type2 type4 type6
1457 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1458 ics_api_idc_get_type 200 type101 testdata/ics/info-type-1.json ENABLED 1
1460 ics_api_idc_get_type 200 type102 testdata/ics/info-type-2.json ENABLED 1
1462 ics_api_idc_get_type 200 type101 testdata/ics/info-type-1.json
1464 ics_api_idc_get_type 200 type102 testdata/ics/info-type-2.json
1467 ics_api_edp_get_type_ids 200 type101 type102 type1 type2 type4 type6
1468 ics_api_edp_get_type_2 200 type101 testdata/ics/info-type-1.json
1469 ics_api_edp_get_type_2 200 type102 testdata/ics/info-type-2.json
1471 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-b prod-c prod-d prod-e
1473 ics_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
1474 ics_api_edp_get_producer_2 200 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
1476 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1478 ## Create job for prod-ib
1480 ics_api_idc_put_job 201 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ics/job-template.json VALIDATE
1482 prodstub_equal create/prod-ib/job103 1
1484 # Check the job data in the producer
1485 prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ics/job-template.json
1487 ics_api_idc_get_job_ids 200 type101 NOWNER job101 job102
1488 ics_api_idc_get_job_ids 200 type102 NOWNER job103
1489 ics_api_idc_get_job_ids 200 type101 info-owner-1 job101
1490 ics_api_idc_get_job_ids 200 type101 info-owner-2 job102
1491 ics_api_idc_get_job_ids 200 type102 info-owner-3 job103
1493 ics_api_idc_get_job 200 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ics/job-template.json
1495 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1497 ics_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ics/job-template.json job102 type101 $TARGET102 info-owner-2 testdata/ics/job-template.json
1498 ics_api_edp_get_producer_jobs_2 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ics/job-template.json
1500 ## Setup prod-ic (no types)
1501 ics_api_edp_put_producer_2 201 prod-ic $CB_JOB/prod-ic $CB_SV/prod-ic NOTYPE
1503 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
1505 ics_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
1506 ics_api_edp_get_producer_2 200 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
1507 ics_api_edp_get_producer_2 200 prod-ic $CB_JOB/prod-ic $CB_SV/prod-ic EMPTY
1509 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1512 ## Delete job103 and prod-ib and re-create if different order
1514 # Delete job then producer
1515 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10
1516 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
1518 ics_api_idc_delete_job 204 job103
1520 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10
1521 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
1523 ics_api_edp_delete_producer 204 prod-ib
1525 ics_api_edp_get_producer_status 404 prod-ib
1527 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10
1528 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ic prod-b prod-c prod-d prod-e
1530 prodstub_equal delete/prod-ib/job103 1
1532 ics_api_idc_put_job 201 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ics/job-template.json VALIDATE
1533 ics_api_idc_get_job_status2 200 job103 DISABLED EMPTYPROD
1535 # Put producer then job
1536 ics_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
1538 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1540 ics_api_idc_put_job 200 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ics/job-template2.json VALIDATE
1541 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1543 prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ics/job-template2.json
1545 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10
1546 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e
1548 prodstub_equal create/prod-ib/job103 3
1549 prodstub_equal delete/prod-ib/job103 1
1551 # Delete only the producer
1552 ics_api_edp_delete_producer 204 prod-ib
1554 ics_api_edp_get_producer_status 404 prod-ib
1556 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10
1557 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ic prod-b prod-c prod-d prod-e
1559 ics_api_idc_get_job_status2 200 job103 DISABLED EMPTYPROD
1561 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1562 cr_equal 0 received_callbacks 19 30
1564 cr_equal 0 received_callbacks?id=info-job103-status 1
1565 cr_api_check_all_ics_events 200 0 info-job103-status DISABLED
1567 cr_equal 0 received_callbacks 7 30
1568 cr_equal 0 received_callbacks?id=info-job103-status 1
1569 cr_api_check_all_ics_events 200 0 info-job103-status DISABLED
1572 # Re-create the producer
1573 ics_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102
1575 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1577 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1579 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1580 cr_equal 0 received_callbacks 20 30
1581 cr_equal 0 received_callbacks?id=info-job103-status 2
1582 cr_api_check_all_ics_events 200 0 info-job103-status ENABLED
1584 cr_equal 0 received_callbacks 8 30
1585 cr_equal 0 received_callbacks?id=info-job103-status 2
1586 cr_api_check_all_ics_events 200 0 info-job103-status ENABLED
1589 prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ics/job-template2.json
1592 ics_api_edp_put_type_2 201 type104 testdata/ics/info-type-4.json
1593 ics_api_edp_put_producer_2 201 prod-id $CB_JOB/prod-id $CB_SV/prod-id type104
1595 ics_api_idc_get_job_ids 200 type104 NOWNER EMPTY
1597 ics_api_idc_put_job 201 job108 type104 $TARGET108 info-owner-4 $INFOSTATUS108 testdata/ics/job-template.json VALIDATE
1599 prodstub_check_jobdata_3 200 prod-id job108 type104 $TARGET108 info-owner-4 testdata/ics/job-template.json
1601 prodstub_equal create/prod-id/job108 1
1602 prodstub_equal delete/prod-id/job108 0
1604 ics_api_idc_get_job_ids 200 type104 NOWNER job108
1606 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1608 # Re-PUT the producer with zero types
1609 ics_api_edp_put_producer_2 200 prod-id $CB_JOB/prod-id $CB_SV/prod-id NOTYPE
1611 ics_api_idc_get_job_ids 200 type104 NOWNER job108
1612 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job108 job1 job2 job3 job8 job10
1614 ics_api_idc_get_job_status2 200 job108 DISABLED EMPTYPROD
1616 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1617 cr_equal 0 received_callbacks 22 30
1618 cr_equal 0 received_callbacks?id=type-status1 13
1619 cr_api_check_all_ics_subscription_events 200 0 type-status1 type104 testdata/ics/info-type-4.json REGISTERED
1621 cr_equal 0 received_callbacks?id=info-job108-status 1
1622 cr_api_check_all_ics_events 200 0 info-job108-status DISABLED
1624 cr_equal 0 received_callbacks 9 30
1625 cr_equal 0 received_callbacks?id=info-job108-status 1
1626 cr_api_check_all_ics_events 200 0 info-job108-status DISABLED
1629 prodstub_equal create/prod-id/job108 1
1630 prodstub_equal delete/prod-id/job108 0
1633 ics_api_edp_put_type_2 200 type104 testdata/ics/info-type-4.json
1634 ics_api_edp_put_producer_2 200 prod-id $CB_JOB/prod-id $CB_SV/prod-id type104
1637 ics_api_idc_get_job_ids 200 type104 NOWNER job108
1638 ics_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job108 job1 job2 job3 job8 job10
1640 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1642 ics_api_edp_get_producer_status 200 prod-ia ENABLED
1643 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1644 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1645 ics_api_edp_get_producer_status 200 prod-id ENABLED
1647 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1648 cr_equal 0 received_callbacks 24 30
1650 cr_equal 0 received_callbacks?id=type-status1 14
1651 cr_api_check_all_ics_subscription_events 200 0 type-status1 type104 testdata/ics/info-type-4.json REGISTERED
1653 cr_equal 0 received_callbacks?id=info-job108-status 2
1654 cr_api_check_all_ics_events 200 0 info-job108-status ENABLED
1656 cr_equal 0 received_callbacks 10 30
1657 cr_equal 0 received_callbacks?id=info-job108-status 2
1658 cr_api_check_all_ics_events 200 0 info-job108-status ENABLED
1661 prodstub_equal create/prod-id/job108 2
1662 prodstub_equal delete/prod-id/job108 0
1666 ics_api_edp_put_type_2 201 type106 testdata/ics/info-type-6.json
1667 ics_api_edp_put_producer_2 201 prod-ie $CB_JOB/prod-ie $CB_SV/prod-ie type106
1669 ics_api_idc_get_job_ids 200 type106 NOWNER EMPTY
1671 ics_api_idc_put_job 201 job110 type106 $TARGET110 info-owner-4 $INFOSTATUS110 testdata/ics/job-template.json VALIDATE
1673 prodstub_check_jobdata_3 200 prod-ie job110 type106 $TARGET110 info-owner-4 testdata/ics/job-template.json
1675 prodstub_equal create/prod-ie/job110 1
1676 prodstub_equal delete/prod-ie/job110 0
1678 ics_api_idc_get_job_ids 200 type106 NOWNER job110
1680 ics_api_idc_get_job_status2 200 job110 ENABLED 1 prod-ie
1683 ics_api_edp_put_type_2 200 type106 testdata/ics/info-type-6.json
1684 ics_api_edp_put_producer_2 201 prod-if $CB_JOB/prod-if $CB_SV/prod-if type106
1686 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1687 cr_equal 0 received_callbacks 26 30
1689 cr_equal 0 received_callbacks?id=type-status1 16
1690 cr_api_check_all_ics_subscription_events 200 0 type-status1 type106 testdata/ics/info-type-6.json REGISTERED type106 testdata/ics/info-type-6.json REGISTERED
1694 ics_api_idc_get_job_ids 200 type106 NOWNER job110
1696 prodstub_check_jobdata_3 200 prod-if job110 type106 $TARGET110 info-owner-4 testdata/ics/job-template.json
1698 prodstub_equal create/prod-if/job110 1
1699 prodstub_equal delete/prod-if/job110 0
1701 ics_api_idc_get_job_ids 200 type106 NOWNER job110
1703 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
1705 ## Status updates prod-ia and jobs
1707 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1709 ics_api_edp_get_producer_status 200 prod-ia ENABLED
1710 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1711 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1712 ics_api_edp_get_producer_status 200 prod-id ENABLED
1713 ics_api_edp_get_producer_status 200 prod-ie ENABLED
1714 ics_api_edp_get_producer_status 200 prod-if ENABLED
1716 # Arm producer prod-ia for supervision failure
1717 prodstub_arm_producer 200 prod-ia 400
1719 # Wait for producer prod-ia to go disabled
1720 ics_api_edp_get_producer_status 200 prod-ia DISABLED 360
1722 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1724 ics_api_edp_get_producer_status 200 prod-ia DISABLED
1725 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1726 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1727 ics_api_edp_get_producer_status 200 prod-id ENABLED
1728 ics_api_edp_get_producer_status 200 prod-ie ENABLED
1729 ics_api_edp_get_producer_status 200 prod-if ENABLED
1732 ics_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia
1733 ics_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia
1734 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1735 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1736 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
1738 # Arm producer prod-ia for supervision
1739 prodstub_arm_producer 200 prod-ia 200
1741 # Wait for producer prod-ia to go enabled
1742 ics_api_edp_get_producer_status 200 prod-ia ENABLED 360
1744 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1746 ics_api_edp_get_producer_status 200 prod-ia ENABLED
1747 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1748 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1749 ics_api_edp_get_producer_status 200 prod-id ENABLED
1750 ics_api_edp_get_producer_status 200 prod-ie ENABLED
1751 ics_api_edp_get_producer_status 200 prod-if ENABLED
1753 ics_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia
1754 ics_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia
1755 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1756 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1757 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
1759 # Arm producer prod-ia for supervision failure
1760 prodstub_arm_producer 200 prod-ia 400
1762 # Wait for producer prod-ia to go disabled
1763 ics_api_edp_get_producer_status 200 prod-ia DISABLED 360
1765 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1767 ics_api_edp_get_producer_status 200 prod-ia DISABLED
1768 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1769 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1770 ics_api_edp_get_producer_status 200 prod-id ENABLED
1771 ics_api_edp_get_producer_status 200 prod-ie ENABLED
1772 ics_api_edp_get_producer_status 200 prod-if ENABLED
1774 ics_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia
1775 ics_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia
1776 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1777 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1778 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
1780 # Wait for producer prod-ia to be removed
1781 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
1782 ics_equal json:data-producer/v1/info-producers 9 1000
1784 ics_equal json:ei-producer/v1/eiproducers 9 1000
1787 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1790 ics_api_edp_get_producer_status 404 prod-ia
1791 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1792 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1793 ics_api_edp_get_producer_status 200 prod-id ENABLED
1794 ics_api_edp_get_producer_status 200 prod-ie ENABLED
1795 ics_api_edp_get_producer_status 200 prod-if ENABLED
1797 ics_api_idc_get_job_status2 200 job101 DISABLED EMPTYPROD
1798 ics_api_idc_get_job_status2 200 job102 DISABLED EMPTYPROD
1799 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1800 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1801 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
1804 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1805 cr_equal 0 received_callbacks 28 30
1807 cr_equal 0 received_callbacks?id=info-job101-status 1
1808 cr_equal 0 received_callbacks?id=info-job102-status 1
1809 cr_api_check_all_ics_events 200 0 info-job101-status DISABLED
1810 cr_api_check_all_ics_events 200 0 info-job102-status DISABLED
1812 cr_equal 0 received_callbacks 12 30
1814 cr_equal 0 received_callbacks?id=info-job101-status 1
1815 cr_equal 0 received_callbacks?id=info-job102-status 1
1816 cr_api_check_all_ics_events 200 0 info-job101-status DISABLED
1817 cr_api_check_all_ics_events 200 0 info-job102-status DISABLED
1821 # Arm producer prod-ie for supervision failure
1822 prodstub_arm_producer 200 prod-ie 400
1824 ics_api_edp_get_producer_status 200 prod-ie DISABLED 1000
1826 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1828 ics_api_edp_get_producer_status 404 prod-ia
1829 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1830 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1831 ics_api_edp_get_producer_status 200 prod-id ENABLED
1832 ics_api_edp_get_producer_status 200 prod-ie DISABLED
1833 ics_api_edp_get_producer_status 200 prod-if ENABLED
1835 ics_api_idc_get_job_status2 200 job101 DISABLED EMPTYPROD
1836 ics_api_idc_get_job_status2 200 job102 DISABLED EMPTYPROD
1837 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1838 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1839 ics_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if
1841 #Disable create for job110 in prod-ie
1842 prodstub_arm_job_create 200 prod-ie job110 400
1844 #Update tjob 10 - only prod-if will be updated
1845 ics_api_idc_put_job 200 job110 type106 $TARGET110 info-owner-4 $INFOSTATUS110 testdata/ics/job-template2.json VALIDATE
1846 #Reset producer and job responses
1847 prodstub_arm_producer 200 prod-ie 200
1848 prodstub_arm_job_create 200 prod-ie job110 200
1850 ics_api_edp_get_producer_status 200 prod-ie ENABLED 360
1852 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e
1854 #Wait for job to be updated
1857 prodstub_check_jobdata_3 200 prod-if job110 type106 $TARGET110 info-owner-4 testdata/ics/job-template2.json
1859 prodstub_arm_producer 200 prod-if 400
1861 ics_api_edp_get_producer_status 200 prod-if DISABLED 360
1863 if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
1864 ics_equal json:data-producer/v1/info-producers 8 1000
1866 ics_equal json:ei-producer/v1/eiproducers 8 1000
1869 ics_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-b prod-c prod-d prod-e
1871 ics_api_edp_get_producer_status 404 prod-ia
1872 ics_api_edp_get_producer_status 200 prod-ib ENABLED
1873 ics_api_edp_get_producer_status 200 prod-ic ENABLED
1874 ics_api_edp_get_producer_status 200 prod-id ENABLED
1875 ics_api_edp_get_producer_status 200 prod-ie ENABLED
1876 ics_api_edp_get_producer_status 404 prod-if
1878 ics_api_idc_get_job_status2 200 job101 DISABLED EMPTYPROD
1879 ics_api_idc_get_job_status2 200 job102 DISABLED EMPTYPROD
1880 ics_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib
1881 ics_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id
1882 ics_api_idc_get_job_status2 200 job110 ENABLED 1 prod-ie
1884 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1885 cr_equal 0 received_callbacks 28
1887 cr_equal 0 received_callbacks 12
1889 ### Test of pre and post validation
1891 ics_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106
1892 ics_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
1893 ics_api_idc_put_job 201 job160 type160 $TARGET160 info-owner-1 $INFOSTATUS160 testdata/ics/job-template.json
1895 ics_api_idc_get_job_status2 404 job150
1896 ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
1898 prodstub_arm_producer 200 prod-ig
1899 prodstub_arm_job_create 200 prod-ig job150
1900 prodstub_arm_job_create 200 prod-ig job160
1902 ics_api_edp_put_producer_2 201 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig NOTYPE
1903 ics_api_edp_get_producer_status 200 prod-ig ENABLED 360
1905 ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig EMPTY
1907 ics_api_idc_get_job_status2 404 job150
1908 ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
1910 prodstub_arm_type 200 prod-ig type160
1912 ics_api_edp_put_type_2 201 type160 testdata/ics/info-type-60.json
1913 ics_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 type160
1915 ics_api_edp_put_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160
1916 ics_api_edp_get_producer_status 200 prod-ig ENABLED 360
1917 ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160
1919 ics_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
1921 ics_api_idc_get_job_status2 404 job150
1922 ics_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig 60
1924 prodstub_check_jobdata_3 200 prod-ig job160 type160 $TARGET160 info-owner-1 testdata/ics/job-template.json
1926 prodstub_equal create/prod-ig/job160 1
1927 prodstub_equal delete/prod-ig/job160 0
1929 prodstub_arm_type 200 prod-ig type150
1931 ics_api_edp_put_type_2 201 type150 testdata/ics/info-type-50.json
1932 ics_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 type160 type150
1934 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1935 cr_equal 0 received_callbacks 30 30
1936 cr_equal 0 received_callbacks?id=type-status1 18
1937 cr_api_check_all_ics_subscription_events 200 0 type-status1 type160 testdata/ics/info-type-60.json REGISTERED type150 testdata/ics/info-type-50.json REGISTERED
1939 cr_equal 0 received_callbacks 12
1942 ics_api_edp_put_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150
1943 ics_api_edp_get_producer_status 200 prod-ig ENABLED 360
1945 ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150
1947 ics_api_idc_get_job_status2 404 job150
1948 ics_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig
1950 ics_api_idc_put_job 201 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
1952 ics_api_idc_get_job_status2 200 job150 ENABLED 1 prod-ig 60
1953 ics_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig
1955 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1956 cr_equal 0 received_callbacks 30 30
1957 cr_equal 0 received_callbacks?id=type-status1 18
1959 cr_equal 0 received_callbacks 12
1962 # Test job deletion at type delete
1964 if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
1966 if [[ "$ICS_FEATURE_LEVEL" == *"RESP_CODE_CHANGE_1" ]]; then
1967 ics_api_edp_delete_type_2 409 type104
1969 ics_api_edp_delete_type_2 406 type104
1972 ics_api_edp_delete_producer 204 prod-id
1974 ics_api_edp_delete_type_2 204 type104
1976 cr_equal 0 received_callbacks 32 30
1977 cr_equal 0 received_callbacks?id=info-job108-status 3
1978 cr_equal 0 received_callbacks?id=type-status1 19
1979 cr_api_check_all_ics_subscription_events 200 0 type-status1 type104 testdata/ics/info-type-4.json DEREGISTERED
1980 cr_api_check_all_ics_events 200 0 info-job108-status DISABLED
1982 ics_api_edp_get_producer 404 prod-id
1984 ics_api_idc_get_job 404 job-108
1987 cr_equal 0 received_callbacks 12
1994 #### TEST COMPLETE ####
1998 auto_clean_environment