BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1 | #!/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 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 21 | TC_ONELINE_DESCR="ECS Create 10000 jobs (ei and info) restart, test job persistency" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 22 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 23 | #App names to include in the test when running docker, space separated list |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 24 | DOCKER_INCLUDED_IMAGES="ECS PRODSTUB CR CP NGW KUBEPROXY" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 25 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 26 | #App names to include in the test when running kubernetes, space separated list |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 27 | KUBE_INCLUDED_IMAGES="ECS PRODSTUB CP CR KUBEPROXY NGW" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 28 | #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list |
| 29 | KUBE_PRESTARTED_IMAGES="" |
| 30 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 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" |
| 35 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 36 | #Supported test environment profiles |
BjornMagnussonXA | fec823b | 2021-08-03 14:14:05 +0200 | [diff] [blame] | 37 | SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 38 | #Supported run modes |
| 39 | SUPPORTED_RUNMODES="DOCKER KUBE" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 40 | |
| 41 | . ../common/testcase_common.sh $@ |
| 42 | . ../common/ecs_api_functions.sh |
| 43 | . ../common/prodstub_api_functions.sh |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 44 | . ../common/control_panel_api_functions.sh |
| 45 | . ../common/controller_api_functions.sh |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 46 | . ../common/cr_api_functions.sh |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 47 | . ../common/kube_proxy_api_functions.sh |
| 48 | . ../common/gateway_api_functions.sh |
| 49 | |
| 50 | setup_testenvironment |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 51 | |
| 52 | #### TEST BEGIN #### |
| 53 | |
| 54 | FLAT_A1_EI="1" |
| 55 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 56 | clean_environment |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 57 | |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 58 | start_kube_proxy |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 59 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 60 | use_ecs_rest_http |
| 61 | |
| 62 | use_prod_stub_http |
| 63 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 64 | start_ecs NOPROXY $SIM_GROUP/$ECS_COMPOSE_DIR/$ECS_CONFIG_FILE |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 65 | |
| 66 | start_prod_stub |
| 67 | |
| 68 | set_ecs_trace |
| 69 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 70 | start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE |
| 71 | |
| 72 | if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then |
| 73 | start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE |
| 74 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 75 | |
| 76 | start_cr |
| 77 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 78 | CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK" |
| 79 | CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 80 | TARGET="http://localhost:80/target" # Dummy target |
| 81 | |
| 82 | NUM_JOBS=10000 |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 83 | use_info_jobs=false #Set flag if interface supporting info-types is used |
| 84 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then |
| 85 | use_info_jobs=true |
| 86 | NUM_JOBS=5000 # 5K ei jobs and 5K info jobs |
| 87 | fi |
| 88 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 89 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 90 | #Type registration status callbacks |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 91 | TYPESTATUS1="$CR_SERVICE_APP_PATH/type-status1" |
| 92 | TYPESTATUS2="$CR_SERVICE_APP_PATH/type-status2" |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 93 | |
| 94 | ecs_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1 |
| 95 | |
| 96 | ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 |
| 97 | |
| 98 | ecs_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2 |
| 99 | |
| 100 | ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 |
| 101 | |
| 102 | fi |
| 103 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 104 | # Setup prodstub sim to accept calls for producers, types and jobs |
| 105 | prodstub_arm_producer 200 prod-a |
| 106 | prodstub_arm_producer 200 prod-b |
| 107 | prodstub_arm_producer 200 prod-c |
| 108 | prodstub_arm_producer 200 prod-d |
| 109 | |
| 110 | prodstub_arm_type 200 prod-a type1 |
| 111 | |
| 112 | prodstub_arm_type 200 prod-b type1 |
| 113 | prodstub_arm_type 200 prod-b type2 |
| 114 | |
| 115 | prodstub_arm_type 200 prod-c type1 |
| 116 | prodstub_arm_type 200 prod-c type2 |
| 117 | prodstub_arm_type 200 prod-c type3 |
| 118 | |
| 119 | prodstub_arm_type 200 prod-d type4 |
| 120 | prodstub_arm_type 200 prod-d type5 |
| 121 | |
| 122 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 123 | do |
| 124 | if [ $(($i%5)) -eq 0 ]; then |
| 125 | prodstub_arm_job_create 200 prod-a job$i |
| 126 | prodstub_arm_job_create 200 prod-b job$i |
| 127 | prodstub_arm_job_create 200 prod-c job$i |
| 128 | fi |
| 129 | if [ $(($i%5)) -eq 1 ]; then |
| 130 | prodstub_arm_job_create 200 prod-b job$i |
| 131 | prodstub_arm_job_create 200 prod-c job$i |
| 132 | fi |
| 133 | if [ $(($i%5)) -eq 2 ]; then |
| 134 | prodstub_arm_job_create 200 prod-c job$i |
| 135 | fi |
| 136 | if [ $(($i%5)) -eq 3 ]; then |
| 137 | prodstub_arm_job_create 200 prod-d job$i |
| 138 | fi |
| 139 | if [ $(($i%5)) -eq 4 ]; then |
| 140 | prodstub_arm_job_create 200 prod-d job$i |
| 141 | fi |
| 142 | done |
| 143 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 144 | if [ $use_info_jobs ]; then |
| 145 | prodstub_arm_producer 200 prod-a |
| 146 | prodstub_arm_producer 200 prod-b |
| 147 | prodstub_arm_producer 200 prod-c |
| 148 | prodstub_arm_producer 200 prod-d |
| 149 | |
| 150 | prodstub_arm_type 200 prod-a type101 |
| 151 | |
| 152 | prodstub_arm_type 200 prod-b type101 |
| 153 | prodstub_arm_type 200 prod-b type102 |
| 154 | |
| 155 | prodstub_arm_type 200 prod-c type101 |
| 156 | prodstub_arm_type 200 prod-c type102 |
| 157 | prodstub_arm_type 200 prod-c type103 |
| 158 | |
| 159 | prodstub_arm_type 200 prod-d type104 |
| 160 | prodstub_arm_type 200 prod-d type105 |
| 161 | |
| 162 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 163 | do |
| 164 | if [ $(($i%5)) -eq 0 ]; then |
| 165 | prodstub_arm_job_create 200 prod-a job$(($i+$NUM_JOBS)) |
| 166 | prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS)) |
| 167 | prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS)) |
| 168 | fi |
| 169 | if [ $(($i%5)) -eq 1 ]; then |
| 170 | prodstub_arm_job_create 200 prod-b job$(($i+$NUM_JOBS)) |
| 171 | prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS)) |
| 172 | fi |
| 173 | if [ $(($i%5)) -eq 2 ]; then |
| 174 | prodstub_arm_job_create 200 prod-c job$(($i+$NUM_JOBS)) |
| 175 | fi |
| 176 | if [ $(($i%5)) -eq 3 ]; then |
| 177 | prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS)) |
| 178 | fi |
| 179 | if [ $(($i%5)) -eq 4 ]; then |
| 180 | prodstub_arm_job_create 200 prod-d job$(($i+$NUM_JOBS)) |
| 181 | fi |
| 182 | done |
| 183 | fi |
| 184 | |
| 185 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 186 | if [ $ECS_VERSION == "V1-1" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 187 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 188 | ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 189 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 190 | 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 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 191 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 192 | 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 |
| 193 | |
| 194 | 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 |
| 195 | |
| 196 | else |
| 197 | |
| 198 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 199 | ecs_api_edp_put_type_2 201 type2 testdata/ecs/ei-type-2.json |
| 200 | ecs_api_edp_put_type_2 201 type3 testdata/ecs/ei-type-3.json |
| 201 | ecs_api_edp_put_type_2 201 type4 testdata/ecs/ei-type-4.json |
| 202 | ecs_api_edp_put_type_2 201 type5 testdata/ecs/ei-type-5.json |
| 203 | |
| 204 | ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 205 | |
| 206 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 |
| 207 | |
| 208 | ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 |
| 209 | |
| 210 | ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 211 | |
| 212 | if [ $use_info_jobs ]; then |
| 213 | ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json |
| 214 | ecs_api_edp_put_type_2 201 type102 testdata/ecs/info-type-2.json |
| 215 | ecs_api_edp_put_type_2 201 type103 testdata/ecs/info-type-3.json |
| 216 | ecs_api_edp_put_type_2 201 type104 testdata/ecs/info-type-4.json |
| 217 | ecs_api_edp_put_type_2 201 type105 testdata/ecs/info-type-5.json |
| 218 | |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 219 | |
| 220 | |
| 221 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 222 | cr_equal received_callbacks 20 30 |
| 223 | cr_equal received_callbacks?id=type-status1 10 |
| 224 | cr_equal received_callbacks?id=type-status2 10 |
| 225 | |
| 226 | cr_api_check_all_ecs_subscription_events 200 type-status1 \ |
| 227 | type1 testdata/ecs/ei-type-1.json REGISTERED \ |
| 228 | type2 testdata/ecs/ei-type-2.json REGISTERED \ |
| 229 | type3 testdata/ecs/ei-type-3.json REGISTERED \ |
| 230 | type4 testdata/ecs/ei-type-4.json REGISTERED \ |
| 231 | type5 testdata/ecs/ei-type-5.json REGISTERED \ |
| 232 | type101 testdata/ecs/info-type-1.json REGISTERED \ |
| 233 | type102 testdata/ecs/info-type-2.json REGISTERED \ |
| 234 | type103 testdata/ecs/info-type-3.json REGISTERED \ |
| 235 | type104 testdata/ecs/info-type-4.json REGISTERED \ |
| 236 | type105 testdata/ecs/info-type-5.json REGISTERED |
| 237 | |
| 238 | cr_api_check_all_ecs_subscription_events 200 type-status2 \ |
| 239 | type1 testdata/ecs/ei-type-1.json REGISTERED \ |
| 240 | type2 testdata/ecs/ei-type-2.json REGISTERED \ |
| 241 | type3 testdata/ecs/ei-type-3.json REGISTERED \ |
| 242 | type4 testdata/ecs/ei-type-4.json REGISTERED \ |
| 243 | type5 testdata/ecs/ei-type-5.json REGISTERED \ |
| 244 | type101 testdata/ecs/info-type-1.json REGISTERED \ |
| 245 | type102 testdata/ecs/info-type-2.json REGISTERED \ |
| 246 | type103 testdata/ecs/info-type-3.json REGISTERED \ |
| 247 | type104 testdata/ecs/info-type-4.json REGISTERED \ |
| 248 | type105 testdata/ecs/info-type-5.json REGISTERED |
| 249 | |
| 250 | fi |
| 251 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 252 | ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101 |
| 253 | |
| 254 | ecs_api_edp_put_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102 |
| 255 | |
| 256 | ecs_api_edp_put_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103 |
| 257 | |
| 258 | ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105 |
| 259 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 260 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 261 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 262 | if [ $use_info_jobs ]; then |
| 263 | ecs_equal json:data-producer/v1/info-producers 4 |
| 264 | else |
| 265 | ecs_equal json:ei-producer/v1/eiproducers 4 |
| 266 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 267 | |
| 268 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 269 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 270 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 271 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 272 | |
| 273 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 274 | do |
| 275 | if [ $(($i%5)) -eq 0 ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 276 | ecs_api_a1_put_job 201 job$i type1 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 277 | if [ -z "$FLAT_A1_EI" ]; then |
| 278 | ecs_api_a1_get_job_status 200 type1 job$i ENABLED |
| 279 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 280 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 281 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 282 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 283 | ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type101 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 284 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 285 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 286 | fi |
| 287 | if [ $(($i%5)) -eq 1 ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 288 | ecs_api_a1_put_job 201 job$i type2 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 289 | if [ -z "$FLAT_A1_EI" ]; then |
| 290 | ecs_api_a1_get_job_status 200 type2 job$i ENABLED |
| 291 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 292 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 293 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 294 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 295 | ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type102 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 296 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 297 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 298 | fi |
| 299 | if [ $(($i%5)) -eq 2 ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 300 | ecs_api_a1_put_job 201 job$i type3 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 301 | if [ -z "$FLAT_A1_EI" ]; then |
| 302 | ecs_api_a1_get_job_status 200 type3 job$i ENABLED |
| 303 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 304 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 305 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 306 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 307 | ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type103 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 308 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 309 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 310 | fi |
| 311 | if [ $(($i%5)) -eq 3 ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 312 | ecs_api_a1_put_job 201 job$i type4 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 313 | if [ -z "$FLAT_A1_EI" ]; then |
| 314 | ecs_api_a1_get_job_status 200 type4 job$i ENABLED |
| 315 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 316 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 317 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 318 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 319 | ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type104 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 320 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 321 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 322 | fi |
| 323 | if [ $(($i%5)) -eq 4 ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 324 | ecs_api_a1_put_job 201 job$i type5 $TARGET ric1 $CR_SERVICE_APP_PATH/job_status_ric1 testdata/ecs/job-template.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 325 | if [ -z "$FLAT_A1_EI" ]; then |
| 326 | ecs_api_a1_get_job_status 200 type5 job$i ENABLED |
| 327 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 328 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 329 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 330 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | 663566c | 2021-11-08 10:25:07 +0100 | [diff] [blame^] | 331 | ecs_api_idc_put_job 201 job$(($i+$NUM_JOBS)) type105 $TARGET info-owner $CR_SERVICE_APP_PATH/job_status_info-owner testdata/ecs/job-template.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 332 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 333 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 334 | fi |
| 335 | done |
| 336 | |
| 337 | if [ -z "$FLAT_A1_EI" ]; then |
| 338 | ecs_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5)) |
| 339 | ecs_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5)) |
| 340 | ecs_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5)) |
| 341 | ecs_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5)) |
| 342 | ecs_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5)) |
| 343 | else |
| 344 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5)) |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 345 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5)) |
| 346 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5)) |
| 347 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5)) |
| 348 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5)) |
| 349 | fi |
| 350 | if [ $use_info_jobs ]; then |
| 351 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5)) |
| 352 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5)) |
| 353 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5)) |
| 354 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5)) |
| 355 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5)) |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 356 | fi |
| 357 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 358 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 359 | cr_equal received_callbacks 20 30 |
| 360 | |
| 361 | else |
| 362 | cr_equal received_callbacks 0 30 |
| 363 | |
| 364 | fi |
| 365 | |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 366 | |
| 367 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 368 | |
| 369 | ecs_equal json:/data-consumer/v1/info-type-subscription 2 200 |
| 370 | |
| 371 | ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 |
| 372 | ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 |
| 373 | |
| 374 | if [ $use_info_jobs ]; then |
| 375 | ecs_equal json:data-producer/v1/info-types 10 1000 |
| 376 | else |
| 377 | ecs_equal json:ei-producer/v1/eitypes 5 1000 |
| 378 | fi |
| 379 | |
| 380 | fi |
| 381 | |
BjornMagnussonXA | a69cd90 | 2021-04-22 23:46:10 +0200 | [diff] [blame] | 382 | stop_ecs |
| 383 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 384 | cr_api_reset |
| 385 | |
BjornMagnussonXA | a69cd90 | 2021-04-22 23:46:10 +0200 | [diff] [blame] | 386 | start_stopped_ecs |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 387 | |
| 388 | set_ecs_trace |
| 389 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 390 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 391 | |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 392 | ecs_equal json:/data-consumer/v1/info-type-subscription 2 200 |
| 393 | |
| 394 | ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 |
| 395 | ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 396 | |
| 397 | if [ $use_info_jobs ]; then |
| 398 | ecs_equal json:data-producer/v1/info-types 10 1000 |
| 399 | else |
| 400 | ecs_equal json:ei-producer/v1/eitypes 5 1000 |
| 401 | fi |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 402 | fi |
| 403 | |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 404 | cr_equal received_callbacks 0 |
| 405 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 406 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 407 | do |
| 408 | if [ $(($i%5)) -eq 0 ]; then |
| 409 | prodstub_delete_jobdata 204 prod-a job$i |
| 410 | prodstub_delete_jobdata 204 prod-b job$i |
| 411 | prodstub_delete_jobdata 204 prod-c job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 412 | if [ $use_info_jobs ]; then |
| 413 | prodstub_delete_jobdata 204 prod-a job$(($i+$NUM_JOBS)) |
| 414 | prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS)) |
| 415 | prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS)) |
| 416 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 417 | fi |
| 418 | if [ $(($i%5)) -eq 1 ]; then |
| 419 | prodstub_delete_jobdata 204 prod-b job$i |
| 420 | prodstub_delete_jobdata 204 prod-c job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 421 | if [ $use_info_jobs ]; then |
| 422 | prodstub_delete_jobdata 204 prod-b job$(($i+$NUM_JOBS)) |
| 423 | prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS)) |
| 424 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 425 | fi |
| 426 | if [ $(($i%5)) -eq 2 ]; then |
| 427 | prodstub_delete_jobdata 204 prod-c job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 428 | if [ $use_info_jobs ]; then |
| 429 | prodstub_delete_jobdata 204 prod-c job$(($i+$NUM_JOBS)) |
| 430 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 431 | fi |
| 432 | if [ $(($i%5)) -eq 3 ]; then |
| 433 | prodstub_delete_jobdata 204 prod-d job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 434 | if [ $use_info_jobs ]; then |
| 435 | prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS)) |
| 436 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 437 | fi |
| 438 | if [ $(($i%5)) -eq 4 ]; then |
| 439 | prodstub_delete_jobdata 204 prod-d job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 440 | if [ $use_info_jobs ]; then |
| 441 | prodstub_delete_jobdata 204 prod-d job$(($i+$NUM_JOBS)) |
| 442 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 443 | fi |
| 444 | done |
| 445 | |
| 446 | ecs_api_edp_get_producer_status 404 prod-a |
| 447 | ecs_api_edp_get_producer_status 404 prod-b |
| 448 | ecs_api_edp_get_producer_status 404 prod-c |
| 449 | ecs_api_edp_get_producer_status 404 prod-d |
| 450 | |
| 451 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 452 | do |
| 453 | if [ $(($i%5)) -eq 0 ]; then |
| 454 | if [ -z "$FLAT_A1_EI" ]; then |
| 455 | ecs_api_a1_get_job_status 200 type1 job$i DISABLED |
| 456 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 457 | ecs_api_a1_get_job_status 200 job$i DISABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 458 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 459 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 460 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 461 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 462 | fi |
| 463 | if [ $(($i%5)) -eq 1 ]; then |
| 464 | if [ -z "$FLAT_A1_EI" ]; then |
| 465 | ecs_api_a1_get_job_status 200 type2 job$i DISABLED |
| 466 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 467 | ecs_api_a1_get_job_status 200 job$i DISABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 468 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 469 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 470 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 471 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 472 | fi |
| 473 | if [ $(($i%5)) -eq 2 ]; then |
| 474 | if [ -z "$FLAT_A1_EI" ]; then |
| 475 | ecs_api_a1_get_job_status 200 type3 job$i DISABLED |
| 476 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 477 | ecs_api_a1_get_job_status 200 job$i DISABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 478 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 479 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 480 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 481 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 482 | fi |
| 483 | if [ $(($i%5)) -eq 3 ]; then |
| 484 | if [ -z "$FLAT_A1_EI" ]; then |
| 485 | ecs_api_a1_get_job_status 200 type4 job$i DISABLED |
| 486 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 487 | ecs_api_a1_get_job_status 200 job$i DISABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 488 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 489 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 490 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 491 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 492 | fi |
| 493 | if [ $(($i%5)) -eq 4 ]; then |
| 494 | if [ -z "$FLAT_A1_EI" ]; then |
| 495 | ecs_api_a1_get_job_status 200 type5 job$i DISABLED |
| 496 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 497 | ecs_api_a1_get_job_status 200 job$i DISABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 498 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 499 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 500 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) DISABLED EMPTYPROD 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 501 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 502 | fi |
| 503 | done |
| 504 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 505 | if [ $ECS_VERSION == "V1-1" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 506 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 507 | ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 508 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 509 | 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 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 510 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 511 | 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 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 512 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 513 | 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 |
| 514 | |
| 515 | else |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 516 | if [ $use_info_jobs ]; then |
| 517 | ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 type101 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 518 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 519 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 type101 type102 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 520 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 521 | ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 type101 type102 type103 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 522 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 523 | ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 type104 type105 |
| 524 | else |
| 525 | ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 526 | |
| 527 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type1 type2 |
| 528 | |
| 529 | ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c type1 type2 type3 |
| 530 | |
| 531 | ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 type5 |
| 532 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 533 | |
| 534 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 535 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 536 | if [ $use_info_jobs ]; then |
| 537 | ecs_equal json:data-producer/v1/info-producers 4 |
| 538 | else |
| 539 | ecs_equal json:ei-producer/v1/eiproducers 4 |
| 540 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 541 | |
| 542 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 543 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 544 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 545 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 546 | |
| 547 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 548 | do |
| 549 | if [ $(($i%5)) -eq 0 ]; then |
| 550 | if [ -z "$FLAT_A1_EI" ]; then |
| 551 | ecs_api_a1_get_job_status 200 type1 job$i ENABLED |
| 552 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 553 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 554 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 555 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 556 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 3 prod-a prod-b prod-c 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 557 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 558 | fi |
| 559 | if [ $(($i%5)) -eq 1 ]; then |
| 560 | if [ -z "$FLAT_A1_EI" ]; then |
| 561 | ecs_api_a1_get_job_status 200 type2 job$i ENABLED |
| 562 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 563 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 564 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 565 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 566 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 2 prod-b prod-c 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 567 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 568 | fi |
| 569 | if [ $(($i%5)) -eq 2 ]; then |
| 570 | if [ -z "$FLAT_A1_EI" ]; then |
| 571 | ecs_api_a1_get_job_status 200 type3 job$i ENABLED |
| 572 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 573 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 574 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 575 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 576 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-c 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 577 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 578 | fi |
| 579 | if [ $(($i%5)) -eq 3 ]; then |
| 580 | if [ -z "$FLAT_A1_EI" ]; then |
| 581 | ecs_api_a1_get_job_status 200 type4 job$i ENABLED |
| 582 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 583 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 584 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 585 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 586 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 587 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 588 | fi |
| 589 | if [ $(($i%5)) -eq 4 ]; then |
| 590 | if [ -z "$FLAT_A1_EI" ]; then |
| 591 | ecs_api_a1_get_job_status 200 type5 job$i ENABLED |
| 592 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 593 | ecs_api_a1_get_job_status 200 job$i ENABLED 120 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 594 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 595 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 596 | ecs_api_idc_get_job_status2 200 job$(($i+$NUM_JOBS)) ENABLED 1 prod-d 120 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 597 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 598 | fi |
| 599 | done |
| 600 | |
| 601 | |
| 602 | if [ -z "$FLAT_A1_EI" ]; then |
| 603 | ecs_equal json:A1-EI/v1/eitypes/type1/eijobs $(($NUM_JOBS/5)) |
| 604 | ecs_equal json:A1-EI/v1/eitypes/type2/eijobs $(($NUM_JOBS/5)) |
| 605 | ecs_equal json:A1-EI/v1/eitypes/type3/eijobs $(($NUM_JOBS/5)) |
| 606 | ecs_equal json:A1-EI/v1/eitypes/type4/eijobs $(($NUM_JOBS/5)) |
| 607 | ecs_equal json:A1-EI/v1/eitypes/type5/eijobs $(($NUM_JOBS/5)) |
| 608 | else |
| 609 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 $(($NUM_JOBS/5)) |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 610 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 $(($NUM_JOBS/5)) |
| 611 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 $(($NUM_JOBS/5)) |
| 612 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 $(($NUM_JOBS/5)) |
| 613 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 $(($NUM_JOBS/5)) |
| 614 | fi |
| 615 | |
| 616 | if [ $use_info_jobs ]; then |
| 617 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 $(($NUM_JOBS/5)) |
| 618 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 $(($NUM_JOBS/5)) |
| 619 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 $(($NUM_JOBS/5)) |
| 620 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 $(($NUM_JOBS/5)) |
| 621 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 $(($NUM_JOBS/5)) |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 622 | fi |
| 623 | |
| 624 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 625 | do |
| 626 | if [ $(($i%5)) -eq 0 ]; then |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 627 | if [ $ECS_VERSION == "V1-1" ]; then |
| 628 | prodstub_check_jobdata 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 629 | prodstub_check_jobdata 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 630 | prodstub_check_jobdata 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 631 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 632 | if [ $use_info_jobs ]; then |
| 633 | prodstub_check_jobdata_3 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 634 | prodstub_check_jobdata_3 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 635 | prodstub_check_jobdata_3 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 636 | else |
| 637 | prodstub_check_jobdata_2 200 prod-a job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 638 | prodstub_check_jobdata_2 200 prod-b job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 639 | prodstub_check_jobdata_2 200 prod-c job$i type1 $TARGET ric1 testdata/ecs/job-template.json |
| 640 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 641 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 642 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 643 | prodstub_check_jobdata_3 200 prod-a job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json |
| 644 | prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json |
| 645 | prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type101 $TARGET info-owner testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 646 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 647 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 648 | fi |
| 649 | if [ $(($i%5)) -eq 1 ]; then |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 650 | if [ $ECS_VERSION == "V1-1" ]; then |
| 651 | prodstub_check_jobdata 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json |
| 652 | prodstub_check_jobdata 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json |
| 653 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 654 | if [ $use_info_jobs ]; then |
| 655 | prodstub_check_jobdata_3 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json |
| 656 | prodstub_check_jobdata_3 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json |
| 657 | else |
| 658 | prodstub_check_jobdata_2 200 prod-b job$i type2 $TARGET ric1 testdata/ecs/job-template.json |
| 659 | prodstub_check_jobdata_2 200 prod-c job$i type2 $TARGET ric1 testdata/ecs/job-template.json |
| 660 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 661 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 662 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 663 | prodstub_check_jobdata_3 200 prod-b job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ecs/job-template.json |
| 664 | prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type102 $TARGET info-owner testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 665 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 666 | fi |
| 667 | if [ $(($i%5)) -eq 2 ]; then |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 668 | if [ $ECS_VERSION == "V1-1" ]; then |
| 669 | prodstub_check_jobdata 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json |
| 670 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 671 | if [ $use_info_jobs ]; then |
| 672 | prodstub_check_jobdata_3 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json |
| 673 | else |
| 674 | prodstub_check_jobdata_2 200 prod-c job$i type3 $TARGET ric1 testdata/ecs/job-template.json |
| 675 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 676 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 677 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 678 | prodstub_check_jobdata_3 200 prod-c job$(($i+$NUM_JOBS)) type103 $TARGET info-owner testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 679 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 680 | fi |
| 681 | if [ $(($i%5)) -eq 3 ]; then |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 682 | if [ $ECS_VERSION == "V1-1" ]; then |
| 683 | prodstub_check_jobdata 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json |
| 684 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 685 | if [ $use_info_jobs ]; then |
| 686 | prodstub_check_jobdata_3 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json |
| 687 | else |
| 688 | prodstub_check_jobdata_2 200 prod-d job$i type4 $TARGET ric1 testdata/ecs/job-template.json |
| 689 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 690 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 691 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 692 | prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type104 $TARGET info-owner testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 693 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 694 | fi |
| 695 | if [ $(($i%5)) -eq 4 ]; then |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 696 | if [ $ECS_VERSION == "V1-1" ]; then |
| 697 | prodstub_check_jobdata 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json |
| 698 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 699 | if [ $use_info_jobs ]; then |
| 700 | prodstub_check_jobdata_3 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json |
| 701 | else |
| 702 | prodstub_check_jobdata_2 200 prod-d job$i type5 $TARGET ric1 testdata/ecs/job-template.json |
| 703 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 704 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 705 | if [ $use_info_jobs ]; then |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 706 | prodstub_check_jobdata_3 200 prod-d job$(($i+$NUM_JOBS)) type105 $TARGET info-owner testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 707 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 708 | fi |
| 709 | done |
| 710 | |
| 711 | |
| 712 | for ((i=1; i<=$NUM_JOBS; i++)) |
| 713 | do |
| 714 | if [ $(($i%5)) -eq 0 ]; then |
| 715 | ecs_api_a1_delete_job 204 job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 716 | if [ $use_info_jobs ]; then |
| 717 | ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS)) |
| 718 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 719 | fi |
| 720 | if [ $(($i%5)) -eq 1 ]; then |
| 721 | ecs_api_a1_delete_job 204 job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 722 | if [ $use_info_jobs ]; then |
| 723 | ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS)) |
| 724 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 725 | fi |
| 726 | if [ $(($i%5)) -eq 2 ]; then |
| 727 | ecs_api_a1_delete_job 204 job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 728 | if [ $use_info_jobs ]; then |
| 729 | ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS)) |
| 730 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 731 | fi |
| 732 | if [ $(($i%5)) -eq 3 ]; then |
| 733 | ecs_api_a1_delete_job 204 job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 734 | if [ $use_info_jobs ]; then |
| 735 | ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS)) |
| 736 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 737 | fi |
| 738 | if [ $(($i%5)) -eq 4 ]; then |
| 739 | ecs_api_a1_delete_job 204 job$i |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 740 | if [ $use_info_jobs ]; then |
| 741 | ecs_api_idc_delete_job 204 job$(($i+$NUM_JOBS)) |
| 742 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 743 | fi |
| 744 | done |
| 745 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 746 | if [ $use_info_jobs ]; then |
| 747 | ecs_equal json:data-producer/v1/info-producers 4 |
| 748 | else |
| 749 | ecs_equal json:ei-producer/v1/eiproducers 4 |
| 750 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 751 | |
| 752 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 753 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 754 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 755 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 756 | |
| 757 | if [ -z "$FLAT_A1_EI" ]; then |
| 758 | ecs_equal json:A1-EI/v1/eitypes/type1/eijobs 0 |
| 759 | ecs_equal json:A1-EI/v1/eitypes/type2/eijobs 0 |
| 760 | ecs_equal json:A1-EI/v1/eitypes/type3/eijobs 0 |
| 761 | ecs_equal json:A1-EI/v1/eitypes/type4/eijobs 0 |
| 762 | ecs_equal json:A1-EI/v1/eitypes/type5/eijobs 0 |
| 763 | else |
| 764 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type1 0 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 765 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type2 0 |
| 766 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type3 0 |
| 767 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type4 0 |
| 768 | ecs_equal json:A1-EI/v1/eijobs?eiTypeId=type5 0 |
| 769 | fi |
| 770 | |
| 771 | if [ $use_info_jobs ]; then |
| 772 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type101 0 |
| 773 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type102 0 |
| 774 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type103 0 |
| 775 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type104 0 |
| 776 | ecs_equal json:data-consumer/v1/info-jobs?infoTypeId=type105 0 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 777 | fi |
| 778 | |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 779 | if [ $use_info_jobs ]; then |
| 780 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 781 | ecs_api_edp_put_type_2 200 type101 testdata/ecs/info-type-1.json |
| 782 | ecs_api_edp_put_type_2 200 type102 testdata/ecs/info-type-2.json |
| 783 | ecs_api_edp_put_type_2 200 type103 testdata/ecs/info-type-3.json |
| 784 | ecs_api_edp_put_type_2 200 type104 testdata/ecs/info-type-4.json |
| 785 | ecs_api_edp_put_type_2 200 type105 testdata/ecs/info-type-5.json |
| 786 | fi |
| 787 | fi |
| 788 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 789 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 790 | cr_equal received_callbacks 10 30 |
| 791 | cr_equal received_callbacks?id=type-status1 5 |
| 792 | cr_equal received_callbacks?id=type-status2 5 |
| 793 | |
| 794 | cr_api_check_all_ecs_subscription_events 200 type-status1 \ |
| 795 | type101 testdata/ecs/info-type-1.json REGISTERED \ |
| 796 | type102 testdata/ecs/info-type-2.json REGISTERED \ |
| 797 | type103 testdata/ecs/info-type-3.json REGISTERED \ |
| 798 | type104 testdata/ecs/info-type-4.json REGISTERED \ |
| 799 | type105 testdata/ecs/info-type-5.json REGISTERED |
| 800 | |
| 801 | cr_api_check_all_ecs_subscription_events 200 type-status2 \ |
| 802 | type101 testdata/ecs/info-type-1.json REGISTERED \ |
| 803 | type102 testdata/ecs/info-type-2.json REGISTERED \ |
| 804 | type103 testdata/ecs/info-type-3.json REGISTERED \ |
| 805 | type104 testdata/ecs/info-type-4.json REGISTERED \ |
| 806 | type105 testdata/ecs/info-type-5.json REGISTERED |
| 807 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 808 | else |
| 809 | cr_equal received_callbacks 0 30 |
| 810 | fi |
| 811 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 812 | check_ecs_logs |
| 813 | |
| 814 | store_logs END |
| 815 | |
| 816 | #### TEST COMPLETE #### |
| 817 | |
| 818 | |
| 819 | print_result |
| 820 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 821 | auto_clean_environment |