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