blob: fd50bc9b2350438c78e912968aa331b77d1814fc [file] [log] [blame]
BjornMagnussonXA7b36db62020-11-23 10:57:57 +01001#!/bin/bash
2
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
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
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=================================================
18#
19
20
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +020021TC_ONELINE_DESCR="ECS Create 10000 jobs (ei and info) restart, test job persistency"
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010022
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010023#App names to include in the test when running docker, space separated list
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010024DOCKER_INCLUDED_IMAGES="ECS PRODSTUB CR CP NGW"
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010025
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010026#App names to include in the test when running kubernetes, space separated list
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010027KUBE_INCLUDED_IMAGES="ECS PRODSTUB CP CR KUBEPROXY NGW"
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010028#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
29KUBE_PRESTARTED_IMAGES=""
30
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010031#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
34CONDITIONALLY_IGNORED_IMAGES="NGW"
35
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010036#Supported test environment profiles
BjornMagnussonXA674793d2021-05-06 19:49:17 +020037SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE"
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010038#Supported run modes
39SUPPORTED_RUNMODES="DOCKER KUBE"
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010040
41. ../common/testcase_common.sh $@
42. ../common/ecs_api_functions.sh
43. ../common/prodstub_api_functions.sh
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010044. ../common/control_panel_api_functions.sh
45. ../common/controller_api_functions.sh
BjornMagnussonXA27db02f2021-01-19 08:13:00 +010046. ../common/cr_api_functions.sh
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010047. ../common/kube_proxy_api_functions.sh
48. ../common/gateway_api_functions.sh
49
50setup_testenvironment
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010051
52#### TEST BEGIN ####
53
54FLAT_A1_EI="1"
55
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010056clean_environment
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010057
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010058if [ $RUNMODE == "KUBE" ]; then
59 start_kube_proxy
60fi
61
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010062use_ecs_rest_http
63
64use_prod_stub_http
65
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010066start_ecs NOPROXY $SIM_GROUP/$ECS_COMPOSE_DIR/$ECS_CONFIG_FILE
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010067
68start_prod_stub
69
70set_ecs_trace
71
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010072start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
73
74if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
75 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
76fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010077
78start_cr
79
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010080CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
81CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010082TARGET="http://localhost:80/target" # Dummy target
83
84NUM_JOBS=10000
85
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +020086use_info_jobs=false #Set flag if interface supporting info-types is used
87if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
88 use_info_jobs=true
89 NUM_JOBS=5000 # 5K ei jobs and 5K info jobs
90fi
91
BjornMagnussonXA7b36db62020-11-23 10:57:57 +010092# Setup prodstub sim to accept calls for producers, types and jobs
93prodstub_arm_producer 200 prod-a
94prodstub_arm_producer 200 prod-b
95prodstub_arm_producer 200 prod-c
96prodstub_arm_producer 200 prod-d
97
98prodstub_arm_type 200 prod-a type1
99
100prodstub_arm_type 200 prod-b type1
101prodstub_arm_type 200 prod-b type2
102
103prodstub_arm_type 200 prod-c type1
104prodstub_arm_type 200 prod-c type2
105prodstub_arm_type 200 prod-c type3
106
107prodstub_arm_type 200 prod-d type4
108prodstub_arm_type 200 prod-d type5
109
110for ((i=1; i<=$NUM_JOBS; i++))
111do
112 if [ $(($i%5)) -eq 0 ]; then
113 prodstub_arm_job_create 200 prod-a job$i
114 prodstub_arm_job_create 200 prod-b job$i
115 prodstub_arm_job_create 200 prod-c job$i
116 fi
117 if [ $(($i%5)) -eq 1 ]; then
118 prodstub_arm_job_create 200 prod-b job$i
119 prodstub_arm_job_create 200 prod-c job$i
120 fi
121 if [ $(($i%5)) -eq 2 ]; then
122 prodstub_arm_job_create 200 prod-c job$i
123 fi
124 if [ $(($i%5)) -eq 3 ]; then
125 prodstub_arm_job_create 200 prod-d job$i
126 fi
127 if [ $(($i%5)) -eq 4 ]; then
128 prodstub_arm_job_create 200 prod-d job$i
129 fi
130done
131
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200132if [ $use_info_jobs ]; then
133 prodstub_arm_producer 200 prod-a
134 prodstub_arm_producer 200 prod-b
135 prodstub_arm_producer 200 prod-c
136 prodstub_arm_producer 200 prod-d
137
138 prodstub_arm_type 200 prod-a type101
139
140 prodstub_arm_type 200 prod-b type101
141 prodstub_arm_type 200 prod-b type102
142
143 prodstub_arm_type 200 prod-c type101
144 prodstub_arm_type 200 prod-c type102
145 prodstub_arm_type 200 prod-c type103
146
147 prodstub_arm_type 200 prod-d type104
148 prodstub_arm_type 200 prod-d type105
149
150 for ((i=1; i<=$NUM_JOBS; i++))
151 do
152 if [ $(($i%5)) -eq 0 ]; then
153 prodstub_arm_job_create 200 prod-a job$(($i+$NUM_JOBS))
154 prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
155 prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
156 fi
157 if [ $(($i%5)) -eq 1 ]; then
158 prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS))
159 prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
160 fi
161 if [ $(($i%5)) -eq 2 ]; then
162 prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS))
163 fi
164 if [ $(($i%5)) -eq 3 ]; then
165 prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
166 fi
167 if [ $(($i%5)) -eq 4 ]; then
168 prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS))
169 fi
170 done
171fi
172
173
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100174if [ $ECS_VERSION == "V1-1" ]; then
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100175
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100176 ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100177
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100178 ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 testdata/ecs/ei-type-1.json type2 testdata/ecs/ei-type-2.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100179
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100180 ecs_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 testdata/ecs/ei-type-1.json type2 testdata/ecs/ei-type-2.json type3 testdata/ecs/ei-type-3.json
181
182 ecs_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json type5 testdata/ecs/ei-type-5.json
183
184else
185
186 ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json
187 ecs_api_edp_put_type_2 201 type2 testdata/ecs/ei-type-2.json
188 ecs_api_edp_put_type_2 201 type3 testdata/ecs/ei-type-3.json
189 ecs_api_edp_put_type_2 201 type4 testdata/ecs/ei-type-4.json
190 ecs_api_edp_put_type_2 201 type5 testdata/ecs/ei-type-5.json
191
192 ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
193
194 ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
195
196 ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
197
198 ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200199
200 if [ $use_info_jobs ]; then
201 ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json
202 ecs_api_edp_put_type_2 201 type102 testdata/ecs/info-type-2.json
203 ecs_api_edp_put_type_2 201 type103 testdata/ecs/info-type-3.json
204 ecs_api_edp_put_type_2 201 type104 testdata/ecs/info-type-4.json
205 ecs_api_edp_put_type_2 201 type105 testdata/ecs/info-type-5.json
206
207 ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
208
209 ecs_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
210
211 ecs_api_edp_put_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
212
213 ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
214 fi
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100215fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100216
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200217if [ $use_info_jobs ]; then
218 ecs_equal json:data-producer/v1/info-producers 4
219else
220 ecs_equal json:ei-producer/v1/eiproducers 4
221fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100222
223ecs_api_edp_get_producer_status 200 prod-a ENABLED
224ecs_api_edp_get_producer_status 200 prod-b ENABLED
225ecs_api_edp_get_producer_status 200 prod-c ENABLED
226ecs_api_edp_get_producer_status 200 prod-d ENABLED
227
228for ((i=1; i<=$NUM_JOBS; i++))
229do
230 if [ $(($i%5)) -eq 0 ]; then
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +0100231 ecs_api_a1_put_job 201 job$i type1 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100232 if [ -z "$FLAT_A1_EI" ]; then
233 ecs_api_a1_get_job_status 200 type1 job$i ENABLED
234 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100235 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100236 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200237 if [ $use_info_jobs ]; then
238 ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
239 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
240 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100241 fi
242 if [ $(($i%5)) -eq 1 ]; then
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +0100243 ecs_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100244 if [ -z "$FLAT_A1_EI" ]; then
245 ecs_api_a1_get_job_status 200 type2 job$i ENABLED
246 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100247 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100248 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200249 if [ $use_info_jobs ]; then
250 ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
251 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
252 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100253 fi
254 if [ $(($i%5)) -eq 2 ]; then
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +0100255 ecs_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100256 if [ -z "$FLAT_A1_EI" ]; then
257 ecs_api_a1_get_job_status 200 type3 job$i ENABLED
258 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100259 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100260 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200261 if [ $use_info_jobs ]; then
262 ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
263 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
264 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100265 fi
266 if [ $(($i%5)) -eq 3 ]; then
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +0100267 ecs_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100268 if [ -z "$FLAT_A1_EI" ]; then
269 ecs_api_a1_get_job_status 200 type4 job$i ENABLED
270 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100271 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100272 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200273 if [ $use_info_jobs ]; then
274 ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
275 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
276 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100277 fi
278 if [ $(($i%5)) -eq 4 ]; then
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +0100279 ecs_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_PATH/job_status_ric1 testdata/ecs/job-template.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100280 if [ -z "$FLAT_A1_EI" ]; then
281 ecs_api_a1_get_job_status 200 type5 job$i ENABLED
282 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100283 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100284 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200285 if [ $use_info_jobs ]; then
286 ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE
287 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
288 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100289 fi
290done
291
292if [ -z "$FLAT_A1_EI" ]; then
293 ecs_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5))
294 ecs_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5))
295 ecs_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5))
296 ecs_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5))
297 ecs_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
298else
299 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200300 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
301 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
302 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
303 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
304fi
305if [ $use_info_jobs ]; then
306 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
307 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
308 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
309 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
310 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100311fi
312
BjornMagnussonXAa69cd902021-04-22 23:46:10 +0200313stop_ecs
314
315start_stopped_ecs
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100316
317set_ecs_trace
318
319for ((i=1; i<=$NUM_JOBS; i++))
320do
321 if [ $(($i%5)) -eq 0 ]; then
322 prodstub_delete_jobdata 204 prod-a job$i
323 prodstub_delete_jobdata 204 prod-b job$i
324 prodstub_delete_jobdata 204 prod-c job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200325 if [ $use_info_jobs ]; then
326 prodstub_delete_jobdata 204 prod-a job$(($i+$NUM_JOBS))
327 prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
328 prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
329 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100330 fi
331 if [ $(($i%5)) -eq 1 ]; then
332 prodstub_delete_jobdata 204 prod-b job$i
333 prodstub_delete_jobdata 204 prod-c job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200334 if [ $use_info_jobs ]; then
335 prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS))
336 prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
337 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100338 fi
339 if [ $(($i%5)) -eq 2 ]; then
340 prodstub_delete_jobdata 204 prod-c job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200341 if [ $use_info_jobs ]; then
342 prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS))
343 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100344 fi
345 if [ $(($i%5)) -eq 3 ]; then
346 prodstub_delete_jobdata 204 prod-d job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200347 if [ $use_info_jobs ]; then
348 prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
349 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100350 fi
351 if [ $(($i%5)) -eq 4 ]; then
352 prodstub_delete_jobdata 204 prod-d job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200353 if [ $use_info_jobs ]; then
354 prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS))
355 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100356 fi
357done
358
359ecs_api_edp_get_producer_status 404 prod-a
360ecs_api_edp_get_producer_status 404 prod-b
361ecs_api_edp_get_producer_status 404 prod-c
362ecs_api_edp_get_producer_status 404 prod-d
363
364for ((i=1; i<=$NUM_JOBS; i++))
365do
366 if [ $(($i%5)) -eq 0 ]; then
367 if [ -z "$FLAT_A1_EI" ]; then
368 ecs_api_a1_get_job_status 200 type1 job$i DISABLED
369 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100370 ecs_api_a1_get_job_status 200 job$i DISABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100371 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200372 if [ $use_info_jobs ]; then
373 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
374 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100375 fi
376 if [ $(($i%5)) -eq 1 ]; then
377 if [ -z "$FLAT_A1_EI" ]; then
378 ecs_api_a1_get_job_status 200 type2 job$i DISABLED
379 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100380 ecs_api_a1_get_job_status 200 job$i DISABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100381 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200382 if [ $use_info_jobs ]; then
383 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
384 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100385 fi
386 if [ $(($i%5)) -eq 2 ]; then
387 if [ -z "$FLAT_A1_EI" ]; then
388 ecs_api_a1_get_job_status 200 type3 job$i DISABLED
389 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100390 ecs_api_a1_get_job_status 200 job$i DISABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100391 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200392 if [ $use_info_jobs ]; then
393 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
394 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100395 fi
396 if [ $(($i%5)) -eq 3 ]; then
397 if [ -z "$FLAT_A1_EI" ]; then
398 ecs_api_a1_get_job_status 200 type4 job$i DISABLED
399 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100400 ecs_api_a1_get_job_status 200 job$i DISABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100401 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200402 if [ $use_info_jobs ]; then
403 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
404 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100405 fi
406 if [ $(($i%5)) -eq 4 ]; then
407 if [ -z "$FLAT_A1_EI" ]; then
408 ecs_api_a1_get_job_status 200 type5 job$i DISABLED
409 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100410 ecs_api_a1_get_job_status 200 job$i DISABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100411 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200412 if [ $use_info_jobs ]; then
413 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) DISABLED 120
414 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100415 fi
416done
417
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100418if [ $ECS_VERSION == "V1-1" ]; then
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100419
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100420 ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100421
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100422 ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 testdata/ecs/ei-type-1.json type2 testdata/ecs/ei-type-2.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100423
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100424 ecs_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 testdata/ecs/ei-type-1.json type2 testdata/ecs/ei-type-2.json type3 testdata/ecs/ei-type-3.json
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100425
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100426 ecs_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json type5 testdata/ecs/ei-type-5.json
427
428else
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200429 if [ $use_info_jobs ]; then
430 ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100431
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200432 ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100433
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200434 ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100435
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200436 ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105
437 else
438 ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1
439
440 ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2
441
442 ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3
443
444 ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5
445 fi
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100446
447fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100448
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200449if [ $use_info_jobs ]; then
450 ecs_equal json:data-producer/v1/info-producers 4
451else
452 ecs_equal json:ei-producer/v1/eiproducers 4
453fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100454
455ecs_api_edp_get_producer_status 200 prod-a ENABLED
456ecs_api_edp_get_producer_status 200 prod-b ENABLED
457ecs_api_edp_get_producer_status 200 prod-c ENABLED
458ecs_api_edp_get_producer_status 200 prod-d ENABLED
459
460for ((i=1; i<=$NUM_JOBS; i++))
461do
462 if [ $(($i%5)) -eq 0 ]; then
463 if [ -z "$FLAT_A1_EI" ]; then
464 ecs_api_a1_get_job_status 200 type1 job$i ENABLED
465 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100466 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100467 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200468 if [ $use_info_jobs ]; then
469 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
470 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100471 fi
472 if [ $(($i%5)) -eq 1 ]; then
473 if [ -z "$FLAT_A1_EI" ]; then
474 ecs_api_a1_get_job_status 200 type2 job$i ENABLED
475 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100476 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100477 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200478 if [ $use_info_jobs ]; then
479 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
480 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100481 fi
482 if [ $(($i%5)) -eq 2 ]; then
483 if [ -z "$FLAT_A1_EI" ]; then
484 ecs_api_a1_get_job_status 200 type3 job$i ENABLED
485 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100486 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100487 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200488 if [ $use_info_jobs ]; then
489 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
490 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100491 fi
492 if [ $(($i%5)) -eq 3 ]; then
493 if [ -z "$FLAT_A1_EI" ]; then
494 ecs_api_a1_get_job_status 200 type4 job$i ENABLED
495 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100496 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100497 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200498 if [ $use_info_jobs ]; then
499 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
500 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100501 fi
502 if [ $(($i%5)) -eq 4 ]; then
503 if [ -z "$FLAT_A1_EI" ]; then
504 ecs_api_a1_get_job_status 200 type5 job$i ENABLED
505 else
BjornMagnussonXA27db02f2021-01-19 08:13:00 +0100506 ecs_api_a1_get_job_status 200 job$i ENABLED 120
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100507 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200508 if [ $use_info_jobs ]; then
509 ecs_api_idc_get_job_status 200 job$(($i+$NUM_JOBS)) ENABLED 120
510 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100511 fi
512done
513
514
515if [ -z "$FLAT_A1_EI" ]; then
516 ecs_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5))
517 ecs_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5))
518 ecs_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5))
519 ecs_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5))
520 ecs_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5))
521else
522 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5))
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200523 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5))
524 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5))
525 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5))
526 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5))
527fi
528
529if [ $use_info_jobs ]; then
530 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5))
531 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5))
532 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5))
533 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5))
534 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5))
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100535fi
536
537for ((i=1; i<=$NUM_JOBS; i++))
538do
539 if [ $(($i%5)) -eq 0 ]; then
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100540 if [ $ECS_VERSION == "V1-1" ]; then
541 prodstub_check_jobdata 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json
542 prodstub_check_jobdata 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
543 prodstub_check_jobdata 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json
544 else
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200545 if [ $use_info_jobs ]; then
546 prodstub_check_jobdata_3 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json
547 prodstub_check_jobdata_3 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
548 prodstub_check_jobdata_3 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json
549 else
550 prodstub_check_jobdata_2 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json
551 prodstub_check_jobdata_2 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json
552 prodstub_check_jobdata_2 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json
553 fi
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100554 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200555 if [ $use_info_jobs ]; then
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200556 prodstub_check_jobdata_3 200 prod-a job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json
557 prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json
558 prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200559 fi
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100560
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100561 fi
562 if [ $(($i%5)) -eq 1 ]; then
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100563 if [ $ECS_VERSION == "V1-1" ]; then
564 prodstub_check_jobdata 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
565 prodstub_check_jobdata 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json
566 else
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200567 if [ $use_info_jobs ]; then
568 prodstub_check_jobdata_3 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
569 prodstub_check_jobdata_3 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json
570 else
571 prodstub_check_jobdata_2 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json
572 prodstub_check_jobdata_2 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json
573 fi
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100574 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200575 if [ $use_info_jobs ]; then
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200576 prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ecs/job-template.json
577 prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ecs/job-template.json
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200578 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100579 fi
580 if [ $(($i%5)) -eq 2 ]; then
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100581 if [ $ECS_VERSION == "V1-1" ]; then
582 prodstub_check_jobdata 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json
583 else
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200584 if [ $use_info_jobs ]; then
585 prodstub_check_jobdata_3 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json
586 else
587 prodstub_check_jobdata_2 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json
588 fi
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100589 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200590 if [ $use_info_jobs ]; then
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200591 prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type103 $TARGET info-owner testdata/ecs/job-template.json
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200592 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100593 fi
594 if [ $(($i%5)) -eq 3 ]; then
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100595 if [ $ECS_VERSION == "V1-1" ]; then
596 prodstub_check_jobdata 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json
597 else
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200598 if [ $use_info_jobs ]; then
599 prodstub_check_jobdata_3 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json
600 else
601 prodstub_check_jobdata_2 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json
602 fi
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100603 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200604 if [ $use_info_jobs ]; then
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200605 prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type104 $TARGET info-owner testdata/ecs/job-template.json
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200606 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100607 fi
608 if [ $(($i%5)) -eq 4 ]; then
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100609 if [ $ECS_VERSION == "V1-1" ]; then
610 prodstub_check_jobdata 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json
611 else
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200612 if [ $use_info_jobs ]; then
613 prodstub_check_jobdata_3 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json
614 else
615 prodstub_check_jobdata_2 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json
616 fi
BjornMagnussonXAc963b732021-01-20 14:24:13 +0100617 fi
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200618 if [ $use_info_jobs ]; then
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200619 prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type105 $TARGET info-owner testdata/ecs/job-template.json
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200620 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100621 fi
622done
623
624
625for ((i=1; i<=$NUM_JOBS; i++))
626do
627 if [ $(($i%5)) -eq 0 ]; then
628 ecs_api_a1_delete_job 204 job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200629 if [ $use_info_jobs ]; then
630 ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
631 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100632 fi
633 if [ $(($i%5)) -eq 1 ]; then
634 ecs_api_a1_delete_job 204 job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200635 if [ $use_info_jobs ]; then
636 ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
637 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100638 fi
639 if [ $(($i%5)) -eq 2 ]; then
640 ecs_api_a1_delete_job 204 job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200641 if [ $use_info_jobs ]; then
642 ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
643 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100644 fi
645 if [ $(($i%5)) -eq 3 ]; then
646 ecs_api_a1_delete_job 204 job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200647 if [ $use_info_jobs ]; then
648 ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
649 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100650 fi
651 if [ $(($i%5)) -eq 4 ]; then
652 ecs_api_a1_delete_job 204 job$i
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200653 if [ $use_info_jobs ]; then
654 ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS))
655 fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100656 fi
657done
658
BjornMagnussonXAce4b14c2021-05-11 15:40:03 +0200659if [ $use_info_jobs ]; then
660 ecs_equal json:data-producer/v1/info-producers 4
661else
662 ecs_equal json:ei-producer/v1/eiproducers 4
663fi
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100664
665ecs_api_edp_get_producer_status 200 prod-a ENABLED
666ecs_api_edp_get_producer_status 200 prod-b ENABLED
667ecs_api_edp_get_producer_status 200 prod-c ENABLED
668ecs_api_edp_get_producer_status 200 prod-d ENABLED
669
670if [ -z "$FLAT_A1_EI" ]; then
671 ecs_equal json:A1-EI/v1/eitypes/type1/eijobs 0
672 ecs_equal json:A1-EI/v1/eitypes/type2/eijobs 0
673 ecs_equal json:A1-EI/v1/eitypes/type3/eijobs 0
674 ecs_equal json:A1-EI/v1/eitypes/type4/eijobs 0
675 ecs_equal json:A1-EI/v1/eitypes/type5/eijobs 0
676else
677 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200678 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 0
679 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 0
680 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 0
681 ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 0
682fi
683
684if [ $use_info_jobs ]; then
685 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 0
686 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 0
687 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 0
688 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 0
689 ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0
BjornMagnussonXA7b36db62020-11-23 10:57:57 +0100690fi
691
692check_ecs_logs
693
694store_logs END
695
696#### TEST COMPLETE ####
697
698
699print_result
700
BjornMagnussonXA9d8fafb2021-05-10 11:11:49 +0200701auto_clean_environment