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