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