BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [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 | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 21 | TC_ONELINE_DESCR="ECS full interfaces walkthrough" |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [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 RICSIM CP HTTPPROXY 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="PRODSTUB CR ECS RICSIM CP HTTPPROXY 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 |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 29 | KUBE_PRESTARTED_IMAGES="" |
| 30 | |
| 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" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 35 | |
| 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 | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 40 | |
| 41 | . ../common/testcase_common.sh $@ |
| 42 | . ../common/ecs_api_functions.sh |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 43 | . ../common/prodstub_api_functions.sh |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 44 | . ../common/cr_api_functions.sh |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 45 | . ../common/control_panel_api_functions.sh |
| 46 | . ../common/controller_api_functions.sh |
| 47 | . ../common/ricsimulator_api_functions.sh |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 48 | . ../common/http_proxy_api_functions.sh |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 49 | . ../common/kube_proxy_api_functions.sh |
| 50 | . ../common/gateway_api_functions.sh |
| 51 | |
| 52 | setup_testenvironment |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 53 | |
| 54 | #### TEST BEGIN #### |
| 55 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 56 | FLAT_A1_EI="1" |
| 57 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 58 | clean_environment |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 59 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 60 | if [ $RUNMODE == "KUBE" ]; then |
| 61 | start_kube_proxy |
| 62 | fi |
| 63 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 64 | use_ecs_rest_https |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 65 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 66 | use_prod_stub_https |
| 67 | |
| 68 | use_simulator_https |
| 69 | |
| 70 | use_cr_https |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 71 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 72 | start_http_proxy |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 73 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 74 | start_ecs NOPROXY $SIM_GROUP/$ECS_COMPOSE_DIR/$ECS_CONFIG_FILE #Change NOPROXY to PROXY to run with http proxy |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 75 | |
| 76 | if [ $RUNMODE == "KUBE" ]; then |
| 77 | ecs_api_admin_reset |
| 78 | fi |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 79 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 80 | start_prod_stub |
| 81 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 82 | set_ecs_debug |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 83 | |
BjornMagnussonXA | be9a07f | 2021-02-25 10:51:46 +0100 | [diff] [blame] | 84 | start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE |
| 85 | |
| 86 | if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then |
| 87 | start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE |
| 88 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 89 | |
| 90 | if [ "$PMS_VERSION" == "V2" ]; then |
| 91 | start_ric_simulators ricsim_g3 4 STD_2.0.0 |
| 92 | fi |
| 93 | |
| 94 | start_cr |
| 95 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 96 | CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK" |
| 97 | CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK" |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 98 | #Targets for ei jobs |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 99 | TARGET1="$RIC_SIM_HTTPX://ricsim_g3_1:$RIC_SIM_PORT/datadelivery" |
| 100 | TARGET2="$RIC_SIM_HTTPX://ricsim_g3_2:$RIC_SIM_PORT/datadelivery" |
| 101 | TARGET3="$RIC_SIM_HTTPX://ricsim_g3_3:$RIC_SIM_PORT/datadelivery" |
| 102 | TARGET8="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery" |
| 103 | TARGET10="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery" |
| 104 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 105 | #Targets for info jobs |
| 106 | TARGET101="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 107 | TARGET102="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 108 | TARGET103="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 109 | TARGET108="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 110 | TARGET110="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 111 | TARGET150="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 112 | TARGET160="http://localhost:80/target" # Dummy target, no target for info data in this env... |
| 113 | |
| 114 | #Status callbacks for eijobs |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 115 | STATUS1="$CR_SERVICE_PATH/job1-status" |
| 116 | STATUS2="$CR_SERVICE_PATH/job2-status" |
| 117 | STATUS3="$CR_SERVICE_PATH/job3-status" |
| 118 | STATUS8="$CR_SERVICE_PATH/job8-status" |
| 119 | STATUS10="$CR_SERVICE_PATH/job10-status" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 120 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 121 | #Status callbacks for infojobs |
| 122 | INFOSTATUS101="$CR_SERVICE_PATH/info-job101-status" |
| 123 | INFOSTATUS102="$CR_SERVICE_PATH/info-job102-status" |
| 124 | INFOSTATUS103="$CR_SERVICE_PATH/info-job103-status" |
| 125 | INFOSTATUS108="$CR_SERVICE_PATH/info-job108-status" |
| 126 | INFOSTATUS110="$CR_SERVICE_PATH/info-job110-status" |
| 127 | INFOSTATUS150="$CR_SERVICE_PATH/info-job150-status" |
| 128 | INFOSTATUS160="$CR_SERVICE_PATH/info-job160-status" |
| 129 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 130 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 131 | #Type registration status callbacks |
| 132 | TYPESTATUS1="$CR_SERVICE_PATH/type-status1" |
| 133 | TYPESTATUS2="$CR_SERVICE_PATH/type-status2" |
| 134 | |
| 135 | ecs_api_idc_put_subscription 201 subscription-id-1 owner1 $TYPESTATUS1 |
| 136 | |
| 137 | ecs_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1 |
| 138 | |
| 139 | ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 |
| 140 | |
| 141 | ecs_api_idc_get_subscription_ids 200 test EMPTY |
| 142 | |
| 143 | ecs_api_idc_get_subscription 200 subscription-id-1 owner1 $TYPESTATUS1 |
| 144 | |
| 145 | ecs_api_idc_get_subscription 404 test |
| 146 | |
| 147 | ecs_api_idc_put_subscription 200 subscription-id-1 owner1 $TYPESTATUS1 |
| 148 | |
| 149 | ecs_api_idc_put_subscription 200 subscription-id-1 owner1 $TYPESTATUS1 |
| 150 | |
| 151 | ecs_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2 |
| 152 | |
| 153 | ecs_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1 subscription-id-2 |
| 154 | |
| 155 | ecs_api_idc_get_subscription_ids 200 owner1 subscription-id-1 |
| 156 | |
| 157 | ecs_api_idc_get_subscription_ids 200 owner2 subscription-id-2 |
| 158 | |
| 159 | ecs_api_idc_get_subscription 200 subscription-id-1 owner1 $TYPESTATUS1 |
| 160 | ecs_api_idc_get_subscription 200 subscription-id-2 owner2 $TYPESTATUS2 |
| 161 | |
| 162 | ecs_api_idc_delete_subscription 204 subscription-id-2 |
| 163 | |
| 164 | ecs_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1 |
| 165 | |
| 166 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 167 | |
| 168 | cr_equal received_callbacks 1 30 |
| 169 | cr_equal received_callbacks?id=type-status1 1 |
| 170 | cr_api_check_all_ecs_subscription_events 200 type-status1 type1 testdata/ecs/ei-type-1.json REGISTERED |
| 171 | |
| 172 | ecs_api_edp_delete_type_2 204 type1 |
| 173 | |
| 174 | cr_equal received_callbacks 2 30 |
| 175 | cr_equal received_callbacks?id=type-status1 2 |
| 176 | cr_api_check_all_ecs_subscription_events 200 type-status1 type1 testdata/ecs/ei-type-1.json DEREGISTERED |
| 177 | |
| 178 | ecs_api_idc_put_subscription 201 subscription-id-2 owner2 $TYPESTATUS2 |
| 179 | ecs_api_idc_get_subscription_ids 200 NOOWNER subscription-id-1 subscription-id-2 |
| 180 | |
| 181 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 182 | |
| 183 | cr_equal received_callbacks 4 30 |
| 184 | cr_equal received_callbacks?id=type-status1 3 |
| 185 | cr_equal received_callbacks?id=type-status2 1 |
| 186 | cr_api_check_all_ecs_subscription_events 200 type-status1 type1 testdata/ecs/ei-type-1.json REGISTERED |
| 187 | |
| 188 | ecs_api_idc_delete_subscription 204 subscription-id-2 |
| 189 | |
| 190 | ecs_api_edp_delete_type_2 204 type1 |
| 191 | |
| 192 | cr_equal received_callbacks 5 30 |
| 193 | cr_equal received_callbacks?id=type-status1 4 |
| 194 | cr_equal received_callbacks?id=type-status2 1 |
| 195 | cr_api_check_all_ecs_subscription_events 200 type-status1 type1 testdata/ecs/ei-type-1.json DEREGISTERED |
| 196 | |
| 197 | cr_api_reset |
| 198 | fi |
| 199 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 200 | ### Setup prodstub sim to accept calls for producers, types and jobs |
| 201 | ## prod-a type1 |
| 202 | ## prod-b type1 and type2 |
| 203 | ## prod-c no-type |
| 204 | ## prod-d type4 |
| 205 | ## prod-e type6 |
| 206 | ## prod-f type6 |
| 207 | |
| 208 | ## job1 -> prod-a |
| 209 | ## job2 -> prod-a |
| 210 | ## job3 -> prod-b |
| 211 | ## job4 -> prod-a |
| 212 | ## job6 -> prod-b |
| 213 | ## job8 -> prod-d |
| 214 | ## job10 -> prod-e and prod-f |
| 215 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 216 | prodstub_arm_producer 200 prod-a |
| 217 | prodstub_arm_producer 200 prod-b |
| 218 | prodstub_arm_producer 200 prod-c |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 219 | prodstub_arm_producer 200 prod-d |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 220 | prodstub_arm_producer 200 prod-e |
| 221 | prodstub_arm_producer 200 prod-f |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 222 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 223 | prodstub_arm_type 200 prod-a type1 |
| 224 | prodstub_arm_type 200 prod-b type2 |
| 225 | prodstub_arm_type 200 prod-b type3 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 226 | prodstub_arm_type 200 prod-d type4 |
| 227 | prodstub_arm_type 200 prod-e type6 |
| 228 | prodstub_arm_type 200 prod-f type6 |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 229 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 230 | prodstub_disarm_type 200 prod-b type3 |
| 231 | prodstub_arm_type 200 prod-b type1 |
| 232 | prodstub_disarm_type 200 prod-b type1 |
| 233 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 234 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 235 | prodstub_arm_job_create 200 prod-a job1 |
| 236 | prodstub_arm_job_create 200 prod-a job2 |
| 237 | prodstub_arm_job_create 200 prod-b job3 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 238 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 239 | prodstub_arm_job_delete 200 prod-a job1 |
| 240 | prodstub_arm_job_delete 200 prod-a job2 |
| 241 | prodstub_arm_job_delete 200 prod-b job3 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 242 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 243 | prodstub_arm_job_create 200 prod-b job4 |
| 244 | prodstub_arm_job_create 200 prod-a job4 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 245 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 246 | prodstub_arm_job_create 200 prod-b job6 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 247 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 248 | prodstub_arm_job_create 200 prod-d job8 |
| 249 | |
| 250 | prodstub_arm_job_create 200 prod-e job10 |
| 251 | prodstub_arm_job_create 200 prod-f job10 |
| 252 | |
| 253 | ### ecs status |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 254 | ecs_api_service_status 200 |
| 255 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 256 | cr_equal received_callbacks 0 |
| 257 | |
| 258 | ### Initial tests - no config made |
| 259 | ### GET: type ids, types, producer ids, producers, job ids, jobs |
| 260 | ### DELETE: jobs |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 261 | ecs_api_a1_get_type_ids 200 EMPTY |
| 262 | ecs_api_a1_get_type 404 test-type |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 263 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 264 | ecs_api_edp_get_type_ids 200 EMPTY |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 265 | if [ $ECS_VERSION == "V1-1" ]; then |
| 266 | ecs_api_edp_get_type 404 test-type |
| 267 | else |
| 268 | ecs_api_edp_get_type_2 404 test-type |
| 269 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 270 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 271 | if [ $ECS_VERSION == "V1-1" ]; then |
| 272 | ecs_api_edp_get_producer_ids 200 EMPTY |
| 273 | ecs_api_edp_get_producer 404 test-prod |
| 274 | else |
| 275 | ecs_api_edp_get_producer_ids_2 200 NOTYPE EMPTY |
| 276 | ecs_api_edp_get_producer_2 404 test-prod |
| 277 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 278 | ecs_api_edp_get_producer_status 404 test-prod |
| 279 | |
| 280 | ecs_api_edp_delete_producer 404 test-prod |
| 281 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 282 | if [ -z "$FLAT_A1_EI" ]; then |
| 283 | ecs_api_a1_get_job_ids 404 test-type NOWNER |
| 284 | ecs_api_a1_get_job_ids 404 test-type test-owner |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 285 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 286 | ecs_api_a1_get_job 404 test-type test-job |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 287 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 288 | ecs_api_a1_get_job_status 404 test-type test-job |
| 289 | else |
| 290 | ecs_api_a1_get_job_ids 200 test-type NOWNER EMPTY |
| 291 | ecs_api_a1_get_job_ids 200 test-type test-owner EMPTY |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 292 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 293 | ecs_api_a1_get_job 404 test-job |
| 294 | |
| 295 | ecs_api_a1_get_job_status 404 test-job |
| 296 | fi |
| 297 | |
| 298 | if [ -z "$FLAT_A1_EI" ]; then |
| 299 | ecs_api_a1_delete_job 404 test-type test-job |
| 300 | else |
| 301 | ecs_api_a1_delete_job 404 test-job |
| 302 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 303 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 304 | if [ $ECS_VERSION == "V1-1" ]; then |
| 305 | ecs_api_edp_get_producer_jobs 404 test-prod |
| 306 | else |
| 307 | ecs_api_edp_get_producer_jobs_2 404 test-prod |
| 308 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 309 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 310 | if [ $ECS_VERSION == "V1-2" ]; then |
| 311 | ecs_api_edp_get_type_2 404 test-type |
| 312 | ecs_api_edp_delete_type_2 404 test-type |
| 313 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 314 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 315 | ### Setup of producer/job and testing apis ### |
| 316 | |
| 317 | ## Setup prod-a |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 318 | if [ $ECS_VERSION == "V1-1" ]; then |
| 319 | ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 320 | ecs_api_edp_put_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 321 | else |
| 322 | #V1-2 |
| 323 | ecs_api_edp_get_type_ids 200 EMPTY |
| 324 | ecs_api_edp_get_type_2 404 type1 |
| 325 | ecs_api_edp_put_producer_2 404 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 326 | |
| 327 | # Create type, delete and create again |
| 328 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 329 | ecs_api_edp_get_type_2 200 type1 |
| 330 | ecs_api_edp_get_type_ids 200 type1 |
| 331 | ecs_api_edp_delete_type_2 204 type1 |
| 332 | ecs_api_edp_get_type_2 404 type1 |
| 333 | ecs_api_edp_get_type_ids 200 EMPTY |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 334 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then |
| 335 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json |
| 336 | else |
| 337 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 338 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 339 | ecs_api_edp_get_type_ids 200 type1 |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 340 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then |
| 341 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json |
| 342 | else |
| 343 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json |
| 344 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 345 | |
| 346 | ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 347 | ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 348 | |
| 349 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 350 | cr_equal received_callbacks 3 30 |
| 351 | cr_equal received_callbacks?id=type-status1 3 |
| 352 | cr_api_check_all_ecs_subscription_events 200 type-status1 type1 testdata/ecs/ei-type-1.json REGISTERED type1 testdata/ecs/ei-type-1.json DEREGISTERED type1 testdata/ecs/ei-type-1.json REGISTERED |
| 353 | else |
| 354 | cr_equal received_callbacks 0 |
| 355 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 356 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 357 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 358 | |
| 359 | ecs_api_a1_get_type_ids 200 type1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 360 | if [ -z "$FLAT_A1_EI" ]; then |
| 361 | ecs_api_a1_get_type 200 type1 testdata/ecs/ei-type-1.json |
| 362 | else |
| 363 | ecs_api_a1_get_type 200 type1 testdata/ecs/empty-type.json |
| 364 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 365 | |
| 366 | ecs_api_edp_get_type_ids 200 type1 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 367 | if [ $ECS_VERSION == "V1-1" ]; then |
| 368 | ecs_api_edp_get_type 200 type1 testdata/ecs/ei-type-1.json prod-a |
| 369 | else |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 370 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then |
| 371 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json |
| 372 | else |
| 373 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json |
| 374 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 375 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 376 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 377 | if [ $ECS_VERSION == "V1-1" ]; then |
| 378 | ecs_api_edp_get_producer_ids 200 prod-a |
| 379 | else |
| 380 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a |
| 381 | ecs_api_edp_get_producer_ids_2 200 type1 prod-a |
| 382 | ecs_api_edp_get_producer_ids_2 200 type2 EMPTY |
| 383 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 384 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 385 | if [ $ECS_VERSION == "V1-1" ]; then |
| 386 | ecs_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 387 | else |
| 388 | ecs_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 389 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 390 | |
| 391 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 392 | |
| 393 | ecs_api_a1_get_job_ids 200 type1 NOWNER EMPTY |
| 394 | ecs_api_a1_get_job_ids 200 type1 test-owner EMPTY |
| 395 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 396 | if [ -z "$FLAT_A1_EI" ]; then |
| 397 | ecs_api_a1_get_job 404 type1 test-job |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 398 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 399 | ecs_api_a1_get_job_status 404 type1 test-job |
| 400 | else |
| 401 | ecs_api_a1_get_job 404 test-job |
| 402 | |
| 403 | ecs_api_a1_get_job_status 404 test-job |
| 404 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 405 | if [ $ECS_VERSION == "V1-1" ]; then |
| 406 | ecs_api_edp_get_producer_jobs 200 prod-a EMPTY |
| 407 | else |
| 408 | ecs_api_edp_get_producer_jobs_2 200 prod-a EMPTY |
| 409 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 410 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 411 | ## Create a job for prod-a |
| 412 | ## job1 - prod-a |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 413 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 414 | ecs_api_a1_put_job 201 type1 job1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 415 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 416 | ecs_api_a1_put_job 201 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 417 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 418 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 419 | # Check the job data in the producer |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 420 | if [ $ECS_VERSION == "V1-1" ]; then |
| 421 | prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 422 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 423 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 424 | prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 425 | else |
| 426 | prodstub_check_jobdata_3 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 427 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 428 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 429 | |
| 430 | ecs_api_a1_get_job_ids 200 type1 NOWNER job1 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 431 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1 |
| 432 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 433 | if [ ! -z "$FLAT_A1_EI" ]; then |
| 434 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 |
| 435 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 436 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 437 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 438 | ecs_api_a1_get_job 200 type1 job1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 439 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 440 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 441 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 442 | ecs_api_a1_get_job 200 job1 type1 $TARGET1 ricsim_g3_1 $STATUS1 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 443 | |
| 444 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 445 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 446 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 447 | prodstub_equal create/prod-a/job1 1 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 448 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 449 | if [ $ECS_VERSION == "V1-1" ]; then |
| 450 | ecs_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 451 | else |
| 452 | ecs_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 453 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 454 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 455 | ## Create a second job for prod-a |
| 456 | ## job2 - prod-a |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 457 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 458 | ecs_api_a1_put_job 201 type1 job2 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 459 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 460 | ecs_api_a1_put_job 201 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 461 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 462 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 463 | # Check the job data in the producer |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 464 | if [ $ECS_VERSION == "V1-1" ]; then |
| 465 | prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 466 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 467 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 468 | prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 469 | else |
| 470 | prodstub_check_jobdata_3 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 471 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 472 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 473 | ecs_api_a1_get_job_ids 200 type1 NOWNER job1 job2 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 474 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1 |
| 475 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 476 | if [ ! -z "$FLAT_A1_EI" ]; then |
| 477 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 |
| 478 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 479 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 480 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 481 | ecs_api_a1_get_job 200 type1 job2 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 482 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 483 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 484 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 485 | ecs_api_a1_get_job 200 job2 type1 $TARGET2 ricsim_g3_2 $STATUS2 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 486 | |
| 487 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 488 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 489 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 490 | prodstub_equal create/prod-a/job2 1 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 491 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 492 | if [ $ECS_VERSION == "V1-1" ]; then |
| 493 | ecs_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 494 | else |
| 495 | ecs_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 496 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 497 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 498 | ## Setup prod-b |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 499 | if [ $ECS_VERSION == "V1-1" ]; then |
| 500 | ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 501 | else |
| 502 | ecs_api_edp_put_type_2 201 type2 testdata/ecs/ei-type-2.json |
| 503 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 504 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 505 | cr_equal received_callbacks 4 30 |
| 506 | cr_equal received_callbacks?id=type-status1 4 |
| 507 | cr_api_check_all_ecs_subscription_events 200 type-status1 type2 testdata/ecs/ei-type-2.json REGISTERED |
| 508 | else |
| 509 | cr_equal received_callbacks 0 |
| 510 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 511 | fi |
| 512 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 513 | |
| 514 | ecs_api_a1_get_type_ids 200 type1 type2 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 515 | if [ -z "$FLAT_A1_EI" ]; then |
| 516 | ecs_api_a1_get_type 200 type1 testdata/ecs/ei-type-1.json |
| 517 | ecs_api_a1_get_type 200 type2 testdata/ecs/ei-type-2.json |
| 518 | else |
| 519 | ecs_api_a1_get_type 200 type1 testdata/ecs/empty-type.json |
| 520 | ecs_api_a1_get_type 200 type2 testdata/ecs/empty-type.json |
| 521 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 522 | |
| 523 | ecs_api_edp_get_type_ids 200 type1 type2 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 524 | if [ $ECS_VERSION == "V1-1" ]; then |
| 525 | ecs_api_edp_get_type 200 type1 testdata/ecs/ei-type-1.json prod-a |
| 526 | ecs_api_edp_get_type 200 type2 testdata/ecs/ei-type-2.json prod-b |
| 527 | else |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 528 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPE-INFO"* ]]; then |
| 529 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json testdata/ecs/info-type-info.json |
| 530 | else |
| 531 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json |
| 532 | fi |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 533 | ecs_api_edp_get_type_2 200 type2 testdata/ecs/ei-type-2.json |
| 534 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 535 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 536 | if [ $ECS_VERSION == "V1-1" ]; then |
| 537 | ecs_api_edp_get_producer_ids 200 prod-a prod-b |
| 538 | else |
| 539 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b |
| 540 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 541 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 542 | if [ $ECS_VERSION == "V1-1" ]; then |
| 543 | ecs_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 544 | ecs_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 545 | else |
| 546 | ecs_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 547 | ecs_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 548 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 549 | |
| 550 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 551 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 552 | ## Create job for prod-b |
| 553 | ## job3 - prod-b |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 554 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 555 | ecs_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 556 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 557 | ecs_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 558 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 559 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 560 | prodstub_equal create/prod-b/job3 1 |
| 561 | |
| 562 | # Check the job data in the producer |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 563 | if [ $ECS_VERSION == "V1-1" ]; then |
| 564 | prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 565 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 566 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 567 | prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 568 | else |
| 569 | prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 570 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 571 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 572 | |
| 573 | ecs_api_a1_get_job_ids 200 type1 NOWNER job1 job2 |
| 574 | ecs_api_a1_get_job_ids 200 type2 NOWNER job3 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 575 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1 |
| 576 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2 |
| 577 | ecs_api_a1_get_job_ids 200 type2 ricsim_g3_3 job3 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 578 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 579 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 580 | ecs_api_a1_get_job 200 type2 job3 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 581 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 582 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 583 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 584 | ecs_api_a1_get_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 585 | |
| 586 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 587 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 588 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 589 | if [ $ECS_VERSION == "V1-1" ]; then |
| 590 | ecs_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 591 | ecs_api_edp_get_producer_jobs 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 592 | else |
| 593 | ecs_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 594 | ecs_api_edp_get_producer_jobs_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 595 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 596 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 597 | ## Setup prod-c (no types) |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 598 | if [ $ECS_VERSION == "V1-1" ]; then |
| 599 | ecs_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE |
| 600 | else |
| 601 | ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE |
| 602 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 603 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 604 | if [ $ECS_VERSION == "V1-1" ]; then |
| 605 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 606 | else |
| 607 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 608 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 609 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 610 | if [ $ECS_VERSION == "V1-1" ]; then |
| 611 | ecs_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 612 | ecs_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 613 | ecs_api_edp_get_producer 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY |
| 614 | else |
| 615 | ecs_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 616 | ecs_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 617 | ecs_api_edp_get_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY |
| 618 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 619 | |
| 620 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 621 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 622 | |
| 623 | ## Delete job3 and prod-b and re-create if different order |
| 624 | |
| 625 | # Delete job then producer |
| 626 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 627 | if [ $ECS_VERSION == "V1-1" ]; then |
| 628 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 629 | else |
| 630 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 631 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 632 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 633 | if [ -z "$FLAT_A1_EI" ]; then |
| 634 | ecs_api_a1_delete_job 204 type2 job3 |
| 635 | else |
| 636 | ecs_api_a1_delete_job 204 job3 |
| 637 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 638 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 639 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 640 | if [ $ECS_VERSION == "V1-1" ]; then |
| 641 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 642 | else |
| 643 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 644 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 645 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 646 | ecs_api_edp_delete_producer 204 prod-b |
| 647 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 648 | ecs_api_edp_get_producer_status 404 prod-b |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 649 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 650 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 651 | if [ $ECS_VERSION == "V1-1" ]; then |
| 652 | ecs_api_edp_get_producer_ids 200 prod-a prod-c |
| 653 | else |
| 654 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c |
| 655 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 656 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 657 | prodstub_equal delete/prod-b/job3 1 |
| 658 | |
| 659 | if [ -z "$FLAT_A1_EI" ]; then |
| 660 | ecs_api_a1_put_job 404 type2 job3 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 661 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 662 | if [ $ECS_VERSION == "V1-1" ]; then |
| 663 | ecs_api_a1_put_job 404 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template.json |
| 664 | else |
| 665 | ecs_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template.json |
| 666 | ecs_api_a1_get_job_status 200 job3 DISABLED |
| 667 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 668 | fi |
| 669 | |
| 670 | # Put producer then job |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 671 | if [ $ECS_VERSION == "V1-1" ]; then |
| 672 | ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 673 | else |
| 674 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 675 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 676 | |
| 677 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 678 | |
| 679 | if [ -z "$FLAT_A1_EI" ]; then |
| 680 | ecs_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 681 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 682 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 683 | if [ $ECS_VERSION == "V1-1" ]; then |
| 684 | ecs_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template2.json |
| 685 | else |
| 686 | ecs_api_a1_put_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template2.json |
| 687 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 688 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 689 | fi |
| 690 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 691 | if [ $ECS_VERSION == "V1-1" ]; then |
| 692 | prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 693 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 694 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 695 | prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 696 | else |
| 697 | prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 698 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 699 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 700 | |
| 701 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 702 | if [ $ECS_VERSION == "V1-1" ]; then |
| 703 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 704 | else |
| 705 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 706 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 707 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 708 | if [ $ECS_VERSION == "V1-1" ]; then |
| 709 | prodstub_equal create/prod-b/job3 2 |
| 710 | else |
| 711 | prodstub_equal create/prod-b/job3 3 |
| 712 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 713 | prodstub_equal delete/prod-b/job3 1 |
| 714 | |
| 715 | # Delete only the producer |
| 716 | ecs_api_edp_delete_producer 204 prod-b |
| 717 | |
| 718 | ecs_api_edp_get_producer_status 404 prod-b |
| 719 | |
| 720 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 721 | if [ $ECS_VERSION == "V1-1" ]; then |
| 722 | ecs_api_edp_get_producer_ids 200 prod-a prod-c |
| 723 | else |
| 724 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c |
| 725 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 726 | |
| 727 | if [ -z "$FLAT_A1_EI" ]; then |
| 728 | ecs_api_a1_get_job_status 200 type2 job3 DISABLED |
| 729 | else |
| 730 | ecs_api_a1_get_job_status 200 job3 DISABLED |
| 731 | fi |
| 732 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 733 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 734 | cr_equal received_callbacks 5 30 |
| 735 | cr_equal received_callbacks?id=type-status1 4 |
| 736 | cr_equal received_callbacks?id=job3-status 1 |
| 737 | cr_api_check_all_ecs_events 200 job3-status DISABLED |
| 738 | else |
| 739 | cr_equal received_callbacks 1 30 |
| 740 | cr_equal received_callbacks?id=job3-status 1 |
| 741 | cr_api_check_all_ecs_events 200 job3-status DISABLED |
| 742 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 743 | |
| 744 | # Re-create the producer |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 745 | if [ $ECS_VERSION == "V1-1" ]; then |
| 746 | ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 747 | else |
| 748 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 749 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 750 | |
| 751 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 752 | |
| 753 | if [ -z "$FLAT_A1_EI" ]; then |
| 754 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 755 | else |
| 756 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 757 | fi |
| 758 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 759 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 760 | cr_equal received_callbacks 6 30 |
| 761 | cr_equal received_callbacks?id=type-status1 4 |
| 762 | cr_equal received_callbacks?id=job3-status 2 |
| 763 | cr_api_check_all_ecs_events 200 job3-status ENABLED |
| 764 | else |
| 765 | cr_equal received_callbacks 2 30 |
| 766 | cr_equal received_callbacks?id=job3-status 2 |
| 767 | cr_api_check_all_ecs_events 200 job3-status ENABLED |
| 768 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 769 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 770 | if [ $ECS_VERSION == "V1-1" ]; then |
| 771 | prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 772 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 773 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 774 | prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 775 | else |
| 776 | prodstub_check_jobdata_3 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 777 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 778 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 779 | |
| 780 | ## Setup prod-d |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 781 | if [ $ECS_VERSION == "V1-1" ]; then |
| 782 | ecs_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json |
| 783 | else |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 784 | ecs_api_edp_put_type_2 201 type4 testdata/ecs/ei-type-4.json |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 785 | ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 |
| 786 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 787 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 788 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 789 | cr_equal received_callbacks 7 30 |
| 790 | cr_equal received_callbacks?id=type-status1 5 |
| 791 | cr_api_check_all_ecs_subscription_events 200 type-status1 type4 testdata/ecs/ei-type-4.json REGISTERED |
| 792 | fi |
| 793 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 794 | ecs_api_a1_get_job_ids 200 type4 NOWNER EMPTY |
| 795 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 796 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 797 | ecs_api_a1_put_job 201 type4 job8 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 798 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 799 | ecs_api_a1_put_job 201 job8 type4 $TARGET8 ricsim_g3_4 $STATUS8 testdata/ecs/job-template.json |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 800 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 801 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 802 | if [ $ECS_VERSION == "V1-1" ]; then |
| 803 | prodstub_check_jobdata 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json |
| 804 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 805 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 806 | prodstub_check_jobdata_2 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json |
| 807 | else |
| 808 | prodstub_check_jobdata_3 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json |
| 809 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 810 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 811 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 812 | prodstub_equal create/prod-d/job8 1 |
| 813 | prodstub_equal delete/prod-d/job8 0 |
| 814 | |
| 815 | ecs_api_a1_get_job_ids 200 type4 NOWNER job8 |
| 816 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 817 | if [ -z "$FLAT_A1_EI" ]; then |
| 818 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 819 | else |
| 820 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 821 | fi |
| 822 | |
| 823 | # Re-PUT the producer with zero types |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 824 | if [ $ECS_VERSION == "V1-1" ]; then |
| 825 | ecs_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE |
| 826 | else |
| 827 | ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE |
| 828 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 829 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 830 | if [ -z "$FLAT_A1_EI" ]; then |
| 831 | ecs_api_a1_get_job_ids 404 type4 NOWNER |
| 832 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 833 | ecs_api_a1_get_job_ids 200 type4 NOWNER job8 |
| 834 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 835 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 836 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 837 | if [ -z "$FLAT_A1_EI" ]; then |
| 838 | ecs_api_a1_get_job_status 200 type4 job8 DISABLED |
| 839 | else |
| 840 | ecs_api_a1_get_job_status 200 job8 DISABLED |
| 841 | fi |
| 842 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 843 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 844 | cr_equal received_callbacks 8 30 |
| 845 | cr_equal received_callbacks?id=type-status1 5 |
| 846 | cr_equal received_callbacks?id=job8-status 1 |
| 847 | cr_api_check_all_ecs_events 200 job8-status DISABLED |
| 848 | else |
| 849 | cr_equal received_callbacks 3 30 |
| 850 | cr_equal received_callbacks?id=job8-status 1 |
| 851 | cr_api_check_all_ecs_events 200 job8-status DISABLED |
| 852 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 853 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 854 | prodstub_equal create/prod-d/job8 1 |
| 855 | prodstub_equal delete/prod-d/job8 0 |
| 856 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 857 | ## Re-setup prod-d |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 858 | if [ $ECS_VERSION == "V1-1" ]; then |
| 859 | ecs_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json |
| 860 | else |
| 861 | ecs_api_edp_put_type_2 200 type4 testdata/ecs/ei-type-4.json |
| 862 | ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 |
| 863 | fi |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 864 | |
| 865 | if [ -z "$FLAT_A1_EI" ]; then |
| 866 | ecs_api_a1_get_job_ids 404 type4 NOWNER |
| 867 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 868 | ecs_api_a1_get_job_ids 200 type4 NOWNER job8 |
| 869 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 870 | fi |
| 871 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 872 | if [ -z "$FLAT_A1_EI" ]; then |
| 873 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 874 | else |
| 875 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 876 | fi |
| 877 | |
| 878 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 879 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 880 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 881 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 882 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 883 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 884 | cr_equal received_callbacks 10 30 |
| 885 | cr_equal received_callbacks?id=type-status1 6 |
| 886 | cr_api_check_all_ecs_subscription_events 200 type-status1 type4 testdata/ecs/ei-type-4.json REGISTERED |
| 887 | |
| 888 | cr_equal received_callbacks?id=job8-status 2 |
| 889 | cr_api_check_all_ecs_events 200 job8-status ENABLED |
| 890 | else |
| 891 | cr_equal received_callbacks 4 30 |
| 892 | cr_equal received_callbacks?id=job8-status 2 |
| 893 | cr_api_check_all_ecs_events 200 job8-status ENABLED |
| 894 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 895 | |
| 896 | prodstub_equal create/prod-d/job8 2 |
| 897 | prodstub_equal delete/prod-d/job8 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 898 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 899 | ## Setup prod-e |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 900 | if [ $ECS_VERSION == "V1-1" ]; then |
| 901 | ecs_api_edp_put_producer 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6 testdata/ecs/ei-type-6.json |
| 902 | else |
| 903 | ecs_api_edp_put_type_2 201 type6 testdata/ecs/ei-type-6.json |
| 904 | ecs_api_edp_put_producer_2 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6 |
| 905 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 906 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 907 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 908 | cr_equal received_callbacks 11 30 |
| 909 | cr_equal received_callbacks?id=type-status1 7 |
| 910 | cr_api_check_all_ecs_subscription_events 200 type-status1 type6 testdata/ecs/ei-type-6.json REGISTERED |
| 911 | fi |
| 912 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 913 | ecs_api_a1_get_job_ids 200 type6 NOWNER EMPTY |
| 914 | |
| 915 | if [ -z "$FLAT_A1_EI" ]; then |
| 916 | ecs_api_a1_put_job 201 type6 job10 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 917 | else |
| 918 | ecs_api_a1_put_job 201 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ecs/job-template.json |
| 919 | fi |
| 920 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 921 | if [ $ECS_VERSION == "V1-1" ]; then |
| 922 | prodstub_check_jobdata 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 923 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 924 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 925 | prodstub_check_jobdata_2 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 926 | else |
| 927 | prodstub_check_jobdata_3 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 928 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 929 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 930 | |
| 931 | prodstub_equal create/prod-e/job10 1 |
| 932 | prodstub_equal delete/prod-e/job10 0 |
| 933 | |
| 934 | ecs_api_a1_get_job_ids 200 type6 NOWNER job10 |
| 935 | |
| 936 | if [ -z "$FLAT_A1_EI" ]; then |
| 937 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 938 | else |
| 939 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 940 | fi |
| 941 | |
| 942 | ## Setup prod-f |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 943 | if [ $ECS_VERSION == "V1-1" ]; then |
| 944 | ecs_api_edp_put_producer 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6 testdata/ecs/ei-type-6.json |
| 945 | else |
| 946 | ecs_api_edp_put_type_2 200 type6 testdata/ecs/ei-type-6.json |
| 947 | ecs_api_edp_put_producer_2 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6 |
| 948 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 949 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 950 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 951 | cr_equal received_callbacks 12 30 |
| 952 | cr_equal received_callbacks?id=type-status1 8 |
| 953 | cr_api_check_all_ecs_subscription_events 200 type-status1 type6 testdata/ecs/ei-type-6.json REGISTERED |
| 954 | fi |
| 955 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 956 | ecs_api_a1_get_job_ids 200 type6 NOWNER job10 |
| 957 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 958 | if [ $ECS_VERSION == "V1-1" ]; then |
| 959 | prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 960 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 961 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 962 | prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 963 | else |
| 964 | prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 965 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 966 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 967 | |
| 968 | prodstub_equal create/prod-f/job10 1 |
| 969 | prodstub_equal delete/prod-f/job10 0 |
| 970 | |
| 971 | ecs_api_a1_get_job_ids 200 type6 NOWNER job10 |
| 972 | |
| 973 | if [ -z "$FLAT_A1_EI" ]; then |
| 974 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 975 | else |
| 976 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 977 | fi |
| 978 | |
| 979 | ## Status updates prod-a and jobs |
| 980 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 981 | if [ $ECS_VERSION == "V1-1" ]; then |
| 982 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 983 | else |
| 984 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 985 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 986 | |
| 987 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 988 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 989 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 990 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 991 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 992 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 993 | |
| 994 | # Arm producer prod-a for supervision failure |
| 995 | prodstub_arm_producer 200 prod-a 400 |
| 996 | |
| 997 | # Wait for producer prod-a to go disabled |
| 998 | ecs_api_edp_get_producer_status 200 prod-a DISABLED 360 |
| 999 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1000 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1001 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 1002 | else |
| 1003 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 1004 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1005 | |
| 1006 | ecs_api_edp_get_producer_status 200 prod-a DISABLED |
| 1007 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 1008 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 1009 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 1010 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 1011 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 1012 | |
| 1013 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1014 | if [ -z "$FLAT_A1_EI" ]; then |
| 1015 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 1016 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 1017 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1018 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1019 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1020 | else |
| 1021 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 1022 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 1023 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1024 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1025 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1026 | fi |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 1027 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1028 | # Arm producer prod-a for supervision |
| 1029 | prodstub_arm_producer 200 prod-a 200 |
| 1030 | |
| 1031 | # Wait for producer prod-a to go enabled |
| 1032 | ecs_api_edp_get_producer_status 200 prod-a ENABLED 360 |
| 1033 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1034 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1035 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 1036 | else |
| 1037 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 1038 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1039 | |
| 1040 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 1041 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 1042 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 1043 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 1044 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 1045 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 1046 | |
| 1047 | if [ -z "$FLAT_A1_EI" ]; then |
| 1048 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 1049 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 1050 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1051 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1052 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1053 | else |
| 1054 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 1055 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 1056 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1057 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1058 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1059 | fi |
| 1060 | |
| 1061 | # Arm producer prod-a for supervision failure |
| 1062 | prodstub_arm_producer 200 prod-a 400 |
| 1063 | |
| 1064 | # Wait for producer prod-a to go disabled |
| 1065 | ecs_api_edp_get_producer_status 200 prod-a DISABLED 360 |
| 1066 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1067 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1068 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 1069 | else |
| 1070 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 1071 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1072 | |
| 1073 | ecs_api_edp_get_producer_status 200 prod-a DISABLED |
| 1074 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 1075 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 1076 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 1077 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 1078 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 1079 | |
| 1080 | if [ -z "$FLAT_A1_EI" ]; then |
| 1081 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 1082 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 1083 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1084 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1085 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1086 | else |
| 1087 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 1088 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 1089 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1090 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1091 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1092 | fi |
| 1093 | |
| 1094 | # Wait for producer prod-a to be removed |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1095 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then |
| 1096 | ecs_equal json:data-producer/v1/info-producers 5 1000 |
| 1097 | else |
| 1098 | ecs_equal json:ei-producer/v1/eiproducers 5 1000 |
| 1099 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1100 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1101 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1102 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f |
| 1103 | else |
| 1104 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f |
| 1105 | fi |
| 1106 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1107 | |
| 1108 | ecs_api_edp_get_producer_status 404 prod-a |
| 1109 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 1110 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 1111 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 1112 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 1113 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 1114 | |
| 1115 | if [ -z "$FLAT_A1_EI" ]; then |
| 1116 | ecs_api_a1_get_job_status 200 type1 job1 DISABLED |
| 1117 | ecs_api_a1_get_job_status 200 type1 job2 DISABLED |
| 1118 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1119 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1120 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1121 | else |
| 1122 | ecs_api_a1_get_job_status 200 job1 DISABLED |
| 1123 | ecs_api_a1_get_job_status 200 job2 DISABLED |
| 1124 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1125 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1126 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1127 | fi |
| 1128 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1129 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1130 | cr_equal received_callbacks 14 30 |
| 1131 | else |
| 1132 | cr_equal received_callbacks 6 30 |
| 1133 | fi |
| 1134 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1135 | cr_equal received_callbacks?id=job1-status 1 |
| 1136 | cr_equal received_callbacks?id=job2-status 1 |
| 1137 | |
| 1138 | cr_api_check_all_ecs_events 200 job1-status DISABLED |
| 1139 | cr_api_check_all_ecs_events 200 job2-status DISABLED |
| 1140 | |
| 1141 | |
| 1142 | # Arm producer prod-e for supervision failure |
| 1143 | prodstub_arm_producer 200 prod-e 400 |
| 1144 | |
| 1145 | ecs_api_edp_get_producer_status 200 prod-e DISABLED 1000 |
| 1146 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1147 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1148 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f |
| 1149 | else |
| 1150 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f |
| 1151 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1152 | |
| 1153 | ecs_api_edp_get_producer_status 404 prod-a |
| 1154 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 1155 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 1156 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 1157 | ecs_api_edp_get_producer_status 200 prod-e DISABLED |
| 1158 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 1159 | |
| 1160 | if [ -z "$FLAT_A1_EI" ]; then |
| 1161 | ecs_api_a1_get_job_status 200 type1 job1 DISABLED |
| 1162 | ecs_api_a1_get_job_status 200 type1 job2 DISABLED |
| 1163 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1164 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1165 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1166 | else |
| 1167 | ecs_api_a1_get_job_status 200 job1 DISABLED |
| 1168 | ecs_api_a1_get_job_status 200 job2 DISABLED |
| 1169 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1170 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1171 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1172 | fi |
| 1173 | |
| 1174 | #Disable create for job10 in prod-e |
| 1175 | prodstub_arm_job_create 200 prod-e job10 400 |
| 1176 | |
| 1177 | #Update tjob 10 - only prod-f will be updated |
| 1178 | if [ -z "$FLAT_A1_EI" ]; then |
| 1179 | ecs_api_a1_put_job 200 type6 job10 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 1180 | else |
| 1181 | ecs_api_a1_put_job 200 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ecs/job-template2.json |
| 1182 | fi |
| 1183 | #Reset producer and job responses |
| 1184 | prodstub_arm_producer 200 prod-e 200 |
| 1185 | prodstub_arm_job_create 200 prod-e job10 200 |
| 1186 | |
| 1187 | ecs_api_edp_get_producer_status 200 prod-e ENABLED 360 |
| 1188 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1189 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1190 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f |
| 1191 | else |
| 1192 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f |
| 1193 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1194 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1195 | #Wait for job to be updated |
| 1196 | sleep_wait 120 |
| 1197 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 1198 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1199 | prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 1200 | else |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1201 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 1202 | prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 1203 | else |
| 1204 | prodstub_check_jobdata_3 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 1205 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 1206 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1207 | |
| 1208 | prodstub_arm_producer 200 prod-f 400 |
| 1209 | |
| 1210 | ecs_api_edp_get_producer_status 200 prod-f DISABLED 360 |
| 1211 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1212 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then |
| 1213 | ecs_equal json:data-producer/v1/info-producers 4 1000 |
| 1214 | else |
| 1215 | ecs_equal json:ei-producer/v1/eiproducers 4 1000 |
| 1216 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1217 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 1218 | if [ $ECS_VERSION == "V1-1" ]; then |
| 1219 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e |
| 1220 | else |
| 1221 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e |
| 1222 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 1223 | |
| 1224 | ecs_api_edp_get_producer_status 404 prod-a |
| 1225 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 1226 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 1227 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 1228 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 1229 | ecs_api_edp_get_producer_status 404 prod-f |
| 1230 | |
| 1231 | if [ -z "$FLAT_A1_EI" ]; then |
| 1232 | ecs_api_a1_get_job_status 200 type1 job1 DISABLED |
| 1233 | ecs_api_a1_get_job_status 200 type1 job2 DISABLED |
| 1234 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1235 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1236 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1237 | else |
| 1238 | ecs_api_a1_get_job_status 200 job1 DISABLED |
| 1239 | ecs_api_a1_get_job_status 200 job2 DISABLED |
| 1240 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1241 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1242 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1243 | fi |
| 1244 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1245 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1246 | cr_equal received_callbacks 14 30 |
| 1247 | else |
| 1248 | cr_equal received_callbacks 6 30 |
| 1249 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 1250 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1251 | |
| 1252 | if [[ "$ECS_FEATURE_LEVEL" != *"INFO-TYPES"* ]]; then |
| 1253 | |
| 1254 | # End test if info types is not impl in tested version |
| 1255 | check_ecs_logs |
| 1256 | |
| 1257 | store_logs END |
| 1258 | |
| 1259 | #### TEST COMPLETE #### |
| 1260 | |
| 1261 | print_result |
| 1262 | |
| 1263 | auto_clean_environment |
| 1264 | fi |
| 1265 | |
| 1266 | |
| 1267 | ############################################ |
| 1268 | # Test of info types |
| 1269 | ############################################ |
| 1270 | |
| 1271 | ### Setup prodstub sim to accept calls for producers, info types and jobs |
| 1272 | ## prod-ia type101 |
| 1273 | ## prod-ib type101 and type102 |
| 1274 | ## prod-ic no-type |
| 1275 | ## prod-id type104 |
| 1276 | ## prod-ie type106 |
| 1277 | ## prod-if type106 |
| 1278 | ## prod-ig type150 (configured later) |
| 1279 | ## prod-ig type160 (configured later) |
| 1280 | |
| 1281 | ## job101 -> prod-ia |
| 1282 | ## job102 -> prod-ia |
| 1283 | ## job103 -> prod-ib |
| 1284 | ## job104 -> prod-ia |
| 1285 | ## job106 -> prod-ib |
| 1286 | ## job108 -> prod-id |
| 1287 | ## job110 -> prod-ie and prod-if |
| 1288 | ## job150 -> prod-ig (configured later) |
| 1289 | |
| 1290 | prodstub_arm_producer 200 prod-ia |
| 1291 | prodstub_arm_producer 200 prod-ib |
| 1292 | prodstub_arm_producer 200 prod-ic |
| 1293 | prodstub_arm_producer 200 prod-id |
| 1294 | prodstub_arm_producer 200 prod-ie |
| 1295 | prodstub_arm_producer 200 prod-if |
| 1296 | |
| 1297 | prodstub_arm_type 200 prod-ia type101 |
| 1298 | prodstub_arm_type 200 prod-ib type102 |
| 1299 | prodstub_arm_type 200 prod-ib type103 |
| 1300 | prodstub_arm_type 200 prod-id type104 |
| 1301 | prodstub_arm_type 200 prod-ie type106 |
| 1302 | prodstub_arm_type 200 prod-if type106 |
| 1303 | |
| 1304 | prodstub_disarm_type 200 prod-ib type103 |
| 1305 | prodstub_arm_type 200 prod-ib type101 |
| 1306 | prodstub_disarm_type 200 prod-ib type101 |
| 1307 | |
| 1308 | |
| 1309 | prodstub_arm_job_create 200 prod-ia job101 |
| 1310 | prodstub_arm_job_create 200 prod-ia job102 |
| 1311 | prodstub_arm_job_create 200 prod-ib job103 |
| 1312 | |
| 1313 | prodstub_arm_job_delete 200 prod-ia job101 |
| 1314 | prodstub_arm_job_delete 200 prod-ia job102 |
| 1315 | prodstub_arm_job_delete 200 prod-ib job103 |
| 1316 | |
| 1317 | prodstub_arm_job_create 200 prod-ib job104 |
| 1318 | prodstub_arm_job_create 200 prod-ia job104 |
| 1319 | |
| 1320 | prodstub_arm_job_create 200 prod-ib job106 |
| 1321 | |
| 1322 | prodstub_arm_job_create 200 prod-id job108 |
| 1323 | |
| 1324 | prodstub_arm_job_create 200 prod-ie job110 |
| 1325 | prodstub_arm_job_create 200 prod-if job110 |
| 1326 | |
| 1327 | |
| 1328 | # NOTE: types, jobs and producers are still present related to eitypes |
| 1329 | |
| 1330 | |
| 1331 | ### Initial tests - no config made |
| 1332 | ### GET: type ids, types, producer ids, producers, job ids, jobs |
| 1333 | ### DELETE: jobs |
| 1334 | ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 |
| 1335 | ecs_api_idc_get_type 404 test-type |
| 1336 | |
| 1337 | ecs_api_edp_get_type_ids 200 type1 type2 type4 type6 |
| 1338 | ecs_api_edp_get_type_2 404 test-type |
| 1339 | |
| 1340 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e |
| 1341 | ecs_api_edp_get_producer_2 404 test-prod |
| 1342 | ecs_api_edp_get_producer_status 404 test-prod |
| 1343 | |
| 1344 | ecs_api_edp_delete_producer 404 test-prod |
| 1345 | |
| 1346 | ecs_api_idc_get_job_ids 200 test-type NOWNER EMPTY |
| 1347 | ecs_api_idc_get_job_ids 200 test-type test-owner EMPTY |
| 1348 | |
| 1349 | ecs_api_idc_get_job 404 test-job |
| 1350 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1351 | ecs_api_idc_get_job_status2 404 test-job |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1352 | |
| 1353 | ecs_api_idc_delete_job 404 test-job |
| 1354 | |
| 1355 | ecs_api_edp_get_producer_jobs_2 404 test-prod |
| 1356 | |
| 1357 | ecs_api_edp_get_type_2 404 test-type |
| 1358 | ecs_api_edp_delete_type_2 404 test-type |
| 1359 | |
| 1360 | ### Setup of producer/job and testing apis ### |
| 1361 | |
| 1362 | ## Setup prod-ia |
| 1363 | ecs_api_edp_get_type_ids 200 type1 type2 type4 type6 |
| 1364 | ecs_api_edp_get_type_2 404 type101 |
| 1365 | ecs_api_edp_put_producer_2 404 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101 |
| 1366 | |
| 1367 | # Create type, delete and create again |
| 1368 | ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json |
| 1369 | ecs_api_edp_get_type_2 200 type101 |
| 1370 | ecs_api_edp_get_type_ids 200 type101 type1 type2 type4 type6 |
| 1371 | ecs_api_edp_delete_type_2 204 type101 |
| 1372 | ecs_api_edp_get_type_2 404 type101 |
| 1373 | ecs_api_edp_get_type_ids 200 type1 type2 type4 type6 |
| 1374 | ecs_api_edp_put_type_2 201 type101 testdata/ecs/info-type-1.json |
| 1375 | ecs_api_edp_get_type_ids 200 type101 type1 type2 type4 type6 |
| 1376 | ecs_api_edp_get_type_2 200 type101 testdata/ecs/info-type-1.json |
| 1377 | |
| 1378 | ecs_api_edp_put_producer_2 201 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101 |
| 1379 | ecs_api_edp_put_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101 |
| 1380 | |
| 1381 | ecs_api_edp_delete_type_2 406 type101 |
| 1382 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1383 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1384 | cr_equal received_callbacks 17 30 |
| 1385 | cr_equal received_callbacks?id=type-status1 11 |
| 1386 | cr_api_check_all_ecs_subscription_events 200 type-status1 type101 testdata/ecs/info-type-1.json REGISTERED type101 testdata/ecs/info-type-1.json DEREGISTERED type101 testdata/ecs/info-type-1.json REGISTERED |
| 1387 | else |
| 1388 | cr_equal received_callbacks 6 |
| 1389 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1390 | |
| 1391 | ecs_api_edp_get_type_ids 200 type101 type1 type2 type4 type6 |
| 1392 | ecs_api_edp_get_type_2 200 type101 testdata/ecs/info-type-1.json |
| 1393 | |
| 1394 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-b prod-c prod-d prod-e |
| 1395 | ecs_api_edp_get_producer_ids_2 200 type101 prod-ia |
| 1396 | ecs_api_edp_get_producer_ids_2 200 type102 EMPTY |
| 1397 | |
| 1398 | ecs_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101 |
| 1399 | |
| 1400 | ecs_api_edp_get_producer_status 200 prod-ia ENABLED |
| 1401 | |
| 1402 | ecs_api_idc_get_job_ids 200 type101 NOWNER EMPTY |
| 1403 | ecs_api_idc_get_job_ids 200 type101 test-owner EMPTY |
| 1404 | |
| 1405 | ecs_api_idc_get_job 404 test-job |
| 1406 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1407 | ecs_api_idc_get_job_status2 404 test-job |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1408 | ecs_api_edp_get_producer_jobs_2 200 prod-ia EMPTY |
| 1409 | |
| 1410 | ## Create a job for prod-ia |
| 1411 | ## job101 - prod-ia |
| 1412 | ecs_api_idc_put_job 201 job101 type101 $TARGET101 info-owner-1 $INFOSTATUS101 testdata/ecs/job-template.json VALIDATE |
| 1413 | |
| 1414 | # Check the job data in the producer |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1415 | prodstub_check_jobdata_3 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1416 | |
| 1417 | ecs_api_idc_get_job_ids 200 type101 NOWNER job101 |
| 1418 | ecs_api_idc_get_job_ids 200 type101 info-owner-1 job101 |
| 1419 | |
| 1420 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job1 job2 job3 job8 job10 |
| 1421 | |
| 1422 | ecs_api_idc_get_job 200 job101 type101 $TARGET101 info-owner-1 $INFOSTATUS101 testdata/ecs/job-template.json |
| 1423 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1424 | ecs_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1425 | |
| 1426 | prodstub_equal create/prod-ia/job101 1 |
| 1427 | |
| 1428 | ecs_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json |
| 1429 | |
| 1430 | ## Create a second job for prod-ia |
| 1431 | ## job102 - prod-ia |
| 1432 | ecs_api_idc_put_job 201 job102 type101 $TARGET102 info-owner-2 $INFOSTATUS102 testdata/ecs/job-template.json VALIDATE |
| 1433 | |
| 1434 | # Check the job data in the producer |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1435 | prodstub_check_jobdata_3 200 prod-ia job102 type101 $TARGET102 info-owner-2 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1436 | ecs_api_idc_get_job_ids 200 type101 NOWNER job101 job102 |
| 1437 | ecs_api_idc_get_job_ids 200 type101 info-owner-1 job101 |
| 1438 | ecs_api_idc_get_job_ids 200 type101 info-owner-2 job102 |
| 1439 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10 |
| 1440 | |
| 1441 | ecs_api_idc_get_job 200 job102 type101 $TARGET102 info-owner-2 $INFOSTATUS102 testdata/ecs/job-template.json |
| 1442 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1443 | ecs_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1444 | |
| 1445 | prodstub_equal create/prod-ia/job102 1 |
| 1446 | |
| 1447 | ecs_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json job102 type101 $TARGET102 info-owner-2 testdata/ecs/job-template.json |
| 1448 | |
| 1449 | |
| 1450 | ## Setup prod-ib |
| 1451 | ecs_api_edp_put_type_2 201 type102 testdata/ecs/info-type-2.json |
| 1452 | ecs_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102 |
| 1453 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1454 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1455 | cr_equal received_callbacks 18 30 |
| 1456 | cr_equal received_callbacks?id=type-status1 12 |
| 1457 | cr_api_check_all_ecs_subscription_events 200 type-status1 type102 testdata/ecs/info-type-2.json REGISTERED |
| 1458 | else |
| 1459 | cr_equal received_callbacks 6 |
| 1460 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1461 | |
| 1462 | ecs_api_idc_get_type_ids 200 type101 type102 type1 type2 type4 type6 |
| 1463 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1464 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1465 | ecs_api_idc_get_type 200 type101 testdata/ecs/info-type-1.json ENABLED 1 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1466 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1467 | ecs_api_idc_get_type 200 type102 testdata/ecs/info-type-2.json ENABLED 1 |
| 1468 | else |
| 1469 | ecs_api_idc_get_type 200 type101 testdata/ecs/info-type-1.json |
| 1470 | |
| 1471 | ecs_api_idc_get_type 200 type102 testdata/ecs/info-type-2.json |
| 1472 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1473 | |
| 1474 | ecs_api_edp_get_type_ids 200 type101 type102 type1 type2 type4 type6 |
| 1475 | ecs_api_edp_get_type_2 200 type101 testdata/ecs/info-type-1.json |
| 1476 | ecs_api_edp_get_type_2 200 type102 testdata/ecs/info-type-2.json |
| 1477 | |
| 1478 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-b prod-c prod-d prod-e |
| 1479 | |
| 1480 | ecs_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101 |
| 1481 | ecs_api_edp_get_producer_2 200 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102 |
| 1482 | |
| 1483 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1484 | |
| 1485 | ## Create job for prod-ib |
| 1486 | ## job103 - prod-ib |
| 1487 | ecs_api_idc_put_job 201 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template.json VALIDATE |
| 1488 | |
| 1489 | prodstub_equal create/prod-ib/job103 1 |
| 1490 | |
| 1491 | # Check the job data in the producer |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1492 | prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1493 | |
| 1494 | ecs_api_idc_get_job_ids 200 type101 NOWNER job101 job102 |
| 1495 | ecs_api_idc_get_job_ids 200 type102 NOWNER job103 |
| 1496 | ecs_api_idc_get_job_ids 200 type101 info-owner-1 job101 |
| 1497 | ecs_api_idc_get_job_ids 200 type101 info-owner-2 job102 |
| 1498 | ecs_api_idc_get_job_ids 200 type102 info-owner-3 job103 |
| 1499 | |
| 1500 | ecs_api_idc_get_job 200 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template.json |
| 1501 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1502 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1503 | |
| 1504 | ecs_api_edp_get_producer_jobs_2 200 prod-ia job101 type101 $TARGET101 info-owner-1 testdata/ecs/job-template.json job102 type101 $TARGET102 info-owner-2 testdata/ecs/job-template.json |
| 1505 | ecs_api_edp_get_producer_jobs_2 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template.json |
| 1506 | |
| 1507 | ## Setup prod-ic (no types) |
| 1508 | ecs_api_edp_put_producer_2 201 prod-ic $CB_JOB/prod-ic $CB_SV/prod-ic NOTYPE |
| 1509 | |
| 1510 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e |
| 1511 | |
| 1512 | ecs_api_edp_get_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101 |
| 1513 | ecs_api_edp_get_producer_2 200 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102 |
| 1514 | ecs_api_edp_get_producer_2 200 prod-ic $CB_JOB/prod-ic $CB_SV/prod-ic EMPTY |
| 1515 | |
| 1516 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1517 | |
| 1518 | |
| 1519 | ## Delete job103 and prod-ib and re-create if different order |
| 1520 | |
| 1521 | # Delete job then producer |
| 1522 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10 |
| 1523 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e |
| 1524 | |
| 1525 | ecs_api_idc_delete_job 204 job103 |
| 1526 | |
| 1527 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10 |
| 1528 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e |
| 1529 | |
| 1530 | ecs_api_edp_delete_producer 204 prod-ib |
| 1531 | |
| 1532 | ecs_api_edp_get_producer_status 404 prod-ib |
| 1533 | |
| 1534 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job1 job2 job3 job8 job10 |
| 1535 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ic prod-b prod-c prod-d prod-e |
| 1536 | |
| 1537 | prodstub_equal delete/prod-ib/job103 1 |
| 1538 | |
| 1539 | ecs_api_idc_put_job 201 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1540 | ecs_api_idc_get_job_status2 200 job103 DISABLED EMPTYPROD |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1541 | |
| 1542 | # Put producer then job |
| 1543 | ecs_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102 |
| 1544 | |
| 1545 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1546 | |
| 1547 | ecs_api_idc_put_job 200 job103 type102 $TARGET103 info-owner-3 $INFOSTATUS103 testdata/ecs/job-template2.json VALIDATE |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1548 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1549 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1550 | prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template2.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1551 | |
| 1552 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10 |
| 1553 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-b prod-c prod-d prod-e |
| 1554 | |
| 1555 | prodstub_equal create/prod-ib/job103 3 |
| 1556 | prodstub_equal delete/prod-ib/job103 1 |
| 1557 | |
| 1558 | # Delete only the producer |
| 1559 | ecs_api_edp_delete_producer 204 prod-ib |
| 1560 | |
| 1561 | ecs_api_edp_get_producer_status 404 prod-ib |
| 1562 | |
| 1563 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job1 job2 job3 job8 job10 |
| 1564 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ic prod-b prod-c prod-d prod-e |
| 1565 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1566 | ecs_api_idc_get_job_status2 200 job103 DISABLED EMPTYPROD |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1567 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1568 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1569 | cr_equal received_callbacks 19 30 |
| 1570 | |
| 1571 | cr_equal received_callbacks?id=info-job103-status 1 |
| 1572 | cr_api_check_all_ecs_events 200 info-job103-status DISABLED |
| 1573 | else |
| 1574 | cr_equal received_callbacks 7 30 |
| 1575 | cr_equal received_callbacks?id=info-job103-status 1 |
| 1576 | cr_api_check_all_ecs_events 200 info-job103-status DISABLED |
| 1577 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1578 | |
| 1579 | # Re-create the producer |
| 1580 | ecs_api_edp_put_producer_2 201 prod-ib $CB_JOB/prod-ib $CB_SV/prod-ib type102 |
| 1581 | |
| 1582 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1583 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1584 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1585 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1586 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1587 | cr_equal received_callbacks 20 30 |
| 1588 | cr_equal received_callbacks?id=info-job103-status 2 |
| 1589 | cr_api_check_all_ecs_events 200 info-job103-status ENABLED |
| 1590 | else |
| 1591 | cr_equal received_callbacks 8 30 |
| 1592 | cr_equal received_callbacks?id=info-job103-status 2 |
| 1593 | cr_api_check_all_ecs_events 200 info-job103-status ENABLED |
| 1594 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1595 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1596 | prodstub_check_jobdata_3 200 prod-ib job103 type102 $TARGET103 info-owner-3 testdata/ecs/job-template2.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1597 | |
| 1598 | ## Setup prod-id |
| 1599 | ecs_api_edp_put_type_2 201 type104 testdata/ecs/info-type-4.json |
| 1600 | ecs_api_edp_put_producer_2 201 prod-id $CB_JOB/prod-id $CB_SV/prod-id type104 |
| 1601 | |
| 1602 | ecs_api_idc_get_job_ids 200 type104 NOWNER EMPTY |
| 1603 | |
| 1604 | ecs_api_idc_put_job 201 job108 type104 $TARGET108 info-owner-4 $INFOSTATUS108 testdata/ecs/job-template.json VALIDATE |
| 1605 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1606 | prodstub_check_jobdata_3 200 prod-id job108 type104 $TARGET108 info-owner-4 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1607 | |
| 1608 | prodstub_equal create/prod-id/job108 1 |
| 1609 | prodstub_equal delete/prod-id/job108 0 |
| 1610 | |
| 1611 | ecs_api_idc_get_job_ids 200 type104 NOWNER job108 |
| 1612 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1613 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1614 | |
| 1615 | # Re-PUT the producer with zero types |
| 1616 | ecs_api_edp_put_producer_2 200 prod-id $CB_JOB/prod-id $CB_SV/prod-id NOTYPE |
| 1617 | |
| 1618 | ecs_api_idc_get_job_ids 200 type104 NOWNER job108 |
| 1619 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job108 job1 job2 job3 job8 job10 |
| 1620 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1621 | ecs_api_idc_get_job_status2 200 job108 DISABLED EMPTYPROD |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1622 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1623 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1624 | cr_equal received_callbacks 22 30 |
| 1625 | cr_equal received_callbacks?id=type-status1 13 |
| 1626 | cr_api_check_all_ecs_subscription_events 200 type-status1 type104 testdata/ecs/info-type-4.json REGISTERED |
| 1627 | |
| 1628 | cr_equal received_callbacks?id=info-job108-status 1 |
| 1629 | cr_api_check_all_ecs_events 200 info-job108-status DISABLED |
| 1630 | else |
| 1631 | cr_equal received_callbacks 9 30 |
| 1632 | cr_equal received_callbacks?id=info-job108-status 1 |
| 1633 | cr_api_check_all_ecs_events 200 info-job108-status DISABLED |
| 1634 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1635 | |
| 1636 | prodstub_equal create/prod-id/job108 1 |
| 1637 | prodstub_equal delete/prod-id/job108 0 |
| 1638 | |
| 1639 | ## Re-setup prod-id |
| 1640 | ecs_api_edp_put_type_2 200 type104 testdata/ecs/info-type-4.json |
| 1641 | ecs_api_edp_put_producer_2 200 prod-id $CB_JOB/prod-id $CB_SV/prod-id type104 |
| 1642 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1643 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1644 | ecs_api_idc_get_job_ids 200 type104 NOWNER job108 |
| 1645 | ecs_api_idc_get_job_ids 200 NOTYPE NOWNER job101 job102 job103 job108 job1 job2 job3 job8 job10 |
| 1646 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1647 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1648 | |
| 1649 | ecs_api_edp_get_producer_status 200 prod-ia ENABLED |
| 1650 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1651 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1652 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1653 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1654 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1655 | cr_equal received_callbacks 24 30 |
| 1656 | |
| 1657 | cr_equal received_callbacks?id=type-status1 14 |
| 1658 | cr_api_check_all_ecs_subscription_events 200 type-status1 type104 testdata/ecs/info-type-4.json REGISTERED |
| 1659 | |
| 1660 | cr_equal received_callbacks?id=info-job108-status 2 |
| 1661 | cr_api_check_all_ecs_events 200 info-job108-status ENABLED |
| 1662 | else |
| 1663 | cr_equal received_callbacks 10 30 |
| 1664 | cr_equal received_callbacks?id=info-job108-status 2 |
| 1665 | cr_api_check_all_ecs_events 200 info-job108-status ENABLED |
| 1666 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1667 | |
| 1668 | prodstub_equal create/prod-id/job108 2 |
| 1669 | prodstub_equal delete/prod-id/job108 0 |
| 1670 | |
| 1671 | |
| 1672 | ## Setup prod-ie |
| 1673 | ecs_api_edp_put_type_2 201 type106 testdata/ecs/info-type-6.json |
| 1674 | ecs_api_edp_put_producer_2 201 prod-ie $CB_JOB/prod-ie $CB_SV/prod-ie type106 |
| 1675 | |
| 1676 | ecs_api_idc_get_job_ids 200 type106 NOWNER EMPTY |
| 1677 | |
| 1678 | ecs_api_idc_put_job 201 job110 type106 $TARGET110 info-owner-4 $INFOSTATUS110 testdata/ecs/job-template.json VALIDATE |
| 1679 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1680 | prodstub_check_jobdata_3 200 prod-ie job110 type106 $TARGET110 info-owner-4 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1681 | |
| 1682 | prodstub_equal create/prod-ie/job110 1 |
| 1683 | prodstub_equal delete/prod-ie/job110 0 |
| 1684 | |
| 1685 | ecs_api_idc_get_job_ids 200 type106 NOWNER job110 |
| 1686 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1687 | ecs_api_idc_get_job_status2 200 job110 ENABLED 1 prod-ie |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1688 | |
| 1689 | ## Setup prod-if |
| 1690 | ecs_api_edp_put_type_2 200 type106 testdata/ecs/info-type-6.json |
| 1691 | ecs_api_edp_put_producer_2 201 prod-if $CB_JOB/prod-if $CB_SV/prod-if type106 |
| 1692 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1693 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1694 | cr_equal received_callbacks 26 30 |
| 1695 | |
| 1696 | cr_equal received_callbacks?id=type-status1 16 |
| 1697 | cr_api_check_all_ecs_subscription_events 200 type-status1 type106 testdata/ecs/info-type-6.json REGISTERED type106 testdata/ecs/info-type-6.json REGISTERED |
| 1698 | fi |
| 1699 | |
| 1700 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1701 | ecs_api_idc_get_job_ids 200 type106 NOWNER job110 |
| 1702 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1703 | prodstub_check_jobdata_3 200 prod-if job110 type106 $TARGET110 info-owner-4 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1704 | |
| 1705 | prodstub_equal create/prod-if/job110 1 |
| 1706 | prodstub_equal delete/prod-if/job110 0 |
| 1707 | |
| 1708 | ecs_api_idc_get_job_ids 200 type106 NOWNER job110 |
| 1709 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1710 | ecs_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1711 | |
| 1712 | ## Status updates prod-ia and jobs |
| 1713 | |
| 1714 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1715 | |
| 1716 | ecs_api_edp_get_producer_status 200 prod-ia ENABLED |
| 1717 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1718 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1719 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1720 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED |
| 1721 | ecs_api_edp_get_producer_status 200 prod-if ENABLED |
| 1722 | |
| 1723 | # Arm producer prod-ia for supervision failure |
| 1724 | prodstub_arm_producer 200 prod-ia 400 |
| 1725 | |
| 1726 | # Wait for producer prod-ia to go disabled |
| 1727 | ecs_api_edp_get_producer_status 200 prod-ia DISABLED 360 |
| 1728 | |
| 1729 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1730 | |
| 1731 | ecs_api_edp_get_producer_status 200 prod-ia DISABLED |
| 1732 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1733 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1734 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1735 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED |
| 1736 | ecs_api_edp_get_producer_status 200 prod-if ENABLED |
| 1737 | |
| 1738 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1739 | ecs_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia |
| 1740 | ecs_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia |
| 1741 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
| 1742 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
| 1743 | ecs_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1744 | |
| 1745 | # Arm producer prod-ia for supervision |
| 1746 | prodstub_arm_producer 200 prod-ia 200 |
| 1747 | |
| 1748 | # Wait for producer prod-ia to go enabled |
| 1749 | ecs_api_edp_get_producer_status 200 prod-ia ENABLED 360 |
| 1750 | |
| 1751 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1752 | |
| 1753 | ecs_api_edp_get_producer_status 200 prod-ia ENABLED |
| 1754 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1755 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1756 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1757 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED |
| 1758 | ecs_api_edp_get_producer_status 200 prod-if ENABLED |
| 1759 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1760 | ecs_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia |
| 1761 | ecs_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia |
| 1762 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
| 1763 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
| 1764 | ecs_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1765 | |
| 1766 | # Arm producer prod-ia for supervision failure |
| 1767 | prodstub_arm_producer 200 prod-ia 400 |
| 1768 | |
| 1769 | # Wait for producer prod-ia to go disabled |
| 1770 | ecs_api_edp_get_producer_status 200 prod-ia DISABLED 360 |
| 1771 | |
| 1772 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ia prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1773 | |
| 1774 | ecs_api_edp_get_producer_status 200 prod-ia DISABLED |
| 1775 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1776 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1777 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1778 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED |
| 1779 | ecs_api_edp_get_producer_status 200 prod-if ENABLED |
| 1780 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1781 | ecs_api_idc_get_job_status2 200 job101 ENABLED 1 prod-ia |
| 1782 | ecs_api_idc_get_job_status2 200 job102 ENABLED 1 prod-ia |
| 1783 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
| 1784 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
| 1785 | ecs_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1786 | |
| 1787 | # Wait for producer prod-ia to be removed |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1788 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then |
| 1789 | ecs_equal json:data-producer/v1/info-producers 9 1000 |
| 1790 | else |
| 1791 | ecs_equal json:ei-producer/v1/eiproducers 9 1000 |
| 1792 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1793 | |
| 1794 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1795 | |
| 1796 | |
| 1797 | ecs_api_edp_get_producer_status 404 prod-ia |
| 1798 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1799 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1800 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1801 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED |
| 1802 | ecs_api_edp_get_producer_status 200 prod-if ENABLED |
| 1803 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1804 | ecs_api_idc_get_job_status2 200 job101 DISABLED EMPTYPROD |
| 1805 | ecs_api_idc_get_job_status2 200 job102 DISABLED EMPTYPROD |
| 1806 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
| 1807 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
| 1808 | ecs_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1809 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1810 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1811 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1812 | cr_equal received_callbacks 28 30 |
| 1813 | |
| 1814 | cr_equal received_callbacks?id=info-job101-status 1 |
| 1815 | cr_equal received_callbacks?id=info-job102-status 1 |
| 1816 | cr_api_check_all_ecs_events 200 info-job101-status DISABLED |
| 1817 | cr_api_check_all_ecs_events 200 info-job102-status DISABLED |
| 1818 | else |
| 1819 | cr_equal received_callbacks 12 30 |
| 1820 | |
| 1821 | cr_equal received_callbacks?id=info-job101-status 1 |
| 1822 | cr_equal received_callbacks?id=info-job102-status 1 |
| 1823 | cr_api_check_all_ecs_events 200 info-job101-status DISABLED |
| 1824 | cr_api_check_all_ecs_events 200 info-job102-status DISABLED |
| 1825 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1826 | |
| 1827 | |
| 1828 | # Arm producer prod-ie for supervision failure |
| 1829 | prodstub_arm_producer 200 prod-ie 400 |
| 1830 | |
| 1831 | ecs_api_edp_get_producer_status 200 prod-ie DISABLED 1000 |
| 1832 | |
| 1833 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1834 | |
| 1835 | ecs_api_edp_get_producer_status 404 prod-ia |
| 1836 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1837 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1838 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1839 | ecs_api_edp_get_producer_status 200 prod-ie DISABLED |
| 1840 | ecs_api_edp_get_producer_status 200 prod-if ENABLED |
| 1841 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1842 | ecs_api_idc_get_job_status2 200 job101 DISABLED EMPTYPROD |
| 1843 | ecs_api_idc_get_job_status2 200 job102 DISABLED EMPTYPROD |
| 1844 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
| 1845 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
| 1846 | ecs_api_idc_get_job_status2 200 job110 ENABLED 2 prod-ie prod-if |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1847 | |
| 1848 | #Disable create for job110 in prod-ie |
| 1849 | prodstub_arm_job_create 200 prod-ie job110 400 |
| 1850 | |
| 1851 | #Update tjob 10 - only prod-if will be updated |
| 1852 | ecs_api_idc_put_job 200 job110 type106 $TARGET110 info-owner-4 $INFOSTATUS110 testdata/ecs/job-template2.json VALIDATE |
| 1853 | #Reset producer and job responses |
| 1854 | prodstub_arm_producer 200 prod-ie 200 |
| 1855 | prodstub_arm_job_create 200 prod-ie job110 200 |
| 1856 | |
| 1857 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED 360 |
| 1858 | |
| 1859 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-if prod-b prod-c prod-d prod-e |
| 1860 | |
| 1861 | #Wait for job to be updated |
| 1862 | sleep_wait 120 |
| 1863 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1864 | prodstub_check_jobdata_3 200 prod-if job110 type106 $TARGET110 info-owner-4 testdata/ecs/job-template2.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1865 | |
| 1866 | prodstub_arm_producer 200 prod-if 400 |
| 1867 | |
| 1868 | ecs_api_edp_get_producer_status 200 prod-if DISABLED 360 |
| 1869 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1870 | if [[ "$ECS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then |
| 1871 | ecs_equal json:data-producer/v1/info-producers 8 1000 |
| 1872 | else |
| 1873 | ecs_equal json:ei-producer/v1/eiproducers 8 1000 |
| 1874 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1875 | |
| 1876 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-ib prod-ic prod-id prod-ie prod-b prod-c prod-d prod-e |
| 1877 | |
| 1878 | ecs_api_edp_get_producer_status 404 prod-ia |
| 1879 | ecs_api_edp_get_producer_status 200 prod-ib ENABLED |
| 1880 | ecs_api_edp_get_producer_status 200 prod-ic ENABLED |
| 1881 | ecs_api_edp_get_producer_status 200 prod-id ENABLED |
| 1882 | ecs_api_edp_get_producer_status 200 prod-ie ENABLED |
| 1883 | ecs_api_edp_get_producer_status 404 prod-if |
| 1884 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1885 | ecs_api_idc_get_job_status2 200 job101 DISABLED EMPTYPROD |
| 1886 | ecs_api_idc_get_job_status2 200 job102 DISABLED EMPTYPROD |
| 1887 | ecs_api_idc_get_job_status2 200 job103 ENABLED 1 prod-ib |
| 1888 | ecs_api_idc_get_job_status2 200 job108 ENABLED 1 prod-id |
| 1889 | ecs_api_idc_get_job_status2 200 job110 ENABLED 1 prod-ie |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1890 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1891 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1892 | cr_equal received_callbacks 28 |
| 1893 | else |
| 1894 | cr_equal received_callbacks 12 |
| 1895 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1896 | ### Test of pre and post validation |
| 1897 | |
| 1898 | ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 |
| 1899 | ecs_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ecs/job-template.json VALIDATE |
| 1900 | ecs_api_idc_put_job 201 job160 type160 $TARGET160 info-owner-1 $INFOSTATUS160 testdata/ecs/job-template.json |
| 1901 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1902 | ecs_api_idc_get_job_status2 404 job150 |
| 1903 | ecs_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1904 | |
| 1905 | prodstub_arm_producer 200 prod-ig |
| 1906 | prodstub_arm_job_create 200 prod-ig job150 |
| 1907 | prodstub_arm_job_create 200 prod-ig job160 |
| 1908 | |
| 1909 | ecs_api_edp_put_producer_2 201 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig NOTYPE |
| 1910 | ecs_api_edp_get_producer_status 200 prod-ig ENABLED 360 |
| 1911 | |
| 1912 | ecs_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig EMPTY |
| 1913 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1914 | ecs_api_idc_get_job_status2 404 job150 |
| 1915 | ecs_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1916 | |
| 1917 | prodstub_arm_type 200 prod-ig type160 |
| 1918 | |
| 1919 | ecs_api_edp_put_type_2 201 type160 testdata/ecs/info-type-60.json |
| 1920 | ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 type160 |
| 1921 | |
| 1922 | ecs_api_edp_put_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 |
| 1923 | ecs_api_edp_get_producer_status 200 prod-ig ENABLED 360 |
| 1924 | ecs_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 |
| 1925 | |
| 1926 | ecs_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ecs/job-template.json VALIDATE |
| 1927 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1928 | ecs_api_idc_get_job_status2 404 job150 |
| 1929 | ecs_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig 60 |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1930 | |
BjornMagnussonXA | ce4b14c | 2021-05-11 15:40:03 +0200 | [diff] [blame] | 1931 | prodstub_check_jobdata_3 200 prod-ig job160 type160 $TARGET160 info-owner-1 testdata/ecs/job-template.json |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1932 | |
| 1933 | prodstub_equal create/prod-ig/job160 1 |
| 1934 | prodstub_equal delete/prod-ig/job160 0 |
| 1935 | |
| 1936 | prodstub_arm_type 200 prod-ig type150 |
| 1937 | |
| 1938 | ecs_api_edp_put_type_2 201 type150 testdata/ecs/info-type-50.json |
| 1939 | ecs_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106 type160 type150 |
| 1940 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1941 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1942 | cr_equal received_callbacks 30 30 |
| 1943 | cr_equal received_callbacks?id=type-status1 18 |
| 1944 | cr_api_check_all_ecs_subscription_events 200 type-status1 type160 testdata/ecs/info-type-60.json REGISTERED type150 testdata/ecs/info-type-50.json REGISTERED |
| 1945 | else |
| 1946 | cr_equal received_callbacks 12 |
| 1947 | fi |
| 1948 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1949 | ecs_api_edp_put_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150 |
| 1950 | ecs_api_edp_get_producer_status 200 prod-ig ENABLED 360 |
| 1951 | |
| 1952 | ecs_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150 |
| 1953 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1954 | ecs_api_idc_get_job_status2 404 job150 |
| 1955 | ecs_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1956 | |
| 1957 | ecs_api_idc_put_job 201 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ecs/job-template.json VALIDATE |
| 1958 | |
BjornMagnussonXA | e45cd2c | 2021-06-18 09:00:49 +0200 | [diff] [blame] | 1959 | ecs_api_idc_get_job_status2 200 job150 ENABLED 1 prod-ig 60 |
| 1960 | ecs_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1961 | |
BjornMagnussonXA | 3cc0b58 | 2021-08-30 10:46:41 +0200 | [diff] [blame] | 1962 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1963 | cr_equal received_callbacks 30 30 |
| 1964 | cr_equal received_callbacks?id=type-status1 18 |
| 1965 | else |
| 1966 | cr_equal received_callbacks 12 |
| 1967 | fi |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 1968 | |
BjornMagnussonXA | 83a750f | 2021-09-21 20:39:58 +0200 | [diff] [blame] | 1969 | # Test job deletion at type delete |
| 1970 | |
| 1971 | if [[ "$ECS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then |
| 1972 | |
| 1973 | ecs_api_edp_delete_type_2 406 type104 |
| 1974 | |
| 1975 | ecs_api_edp_delete_producer 204 prod-id |
| 1976 | |
| 1977 | ecs_api_edp_delete_type_2 204 type104 |
| 1978 | |
| 1979 | cr_equal received_callbacks 32 30 |
| 1980 | cr_equal received_callbacks?id=info-job108-status 3 |
| 1981 | cr_equal received_callbacks?id=type-status1 19 |
| 1982 | cr_api_check_all_ecs_subscription_events 200 type-status1 type104 testdata/ecs/info-type-4.json DEREGISTERED |
| 1983 | cr_api_check_all_ecs_events 200 info-job108-status DISABLED |
| 1984 | |
| 1985 | ecs_api_edp_get_producer 404 prod-id |
| 1986 | |
| 1987 | ecs_api_idc_get_job 404 job-108 |
| 1988 | |
| 1989 | else |
| 1990 | cr_equal received_callbacks 12 |
| 1991 | fi |
| 1992 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 1993 | check_ecs_logs |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 1994 | |
| 1995 | store_logs END |
| 1996 | |
| 1997 | #### TEST COMPLETE #### |
| 1998 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 1999 | print_result |
| 2000 | |
BjornMagnussonXA | 9d8fafb | 2021-05-10 11:11:49 +0200 | [diff] [blame] | 2001 | auto_clean_environment |