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