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 | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 24 | DOCKER_INCLUDED_IMAGES="ECS PRODSTUB CR RICSIM CP HTTPPROXY" |
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 | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 27 | KUBE_INCLUDED_IMAGES=" PRODSTUB CR ECS RICSIM CP HTTPPROXY" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 28 | #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list |
| 29 | KUBE_PRESTARTED_IMAGES=" " |
| 30 | |
| 31 | #Supported test environment profiles |
BjornMagnussonXA | 89b64ab | 2020-12-16 09:21:01 +0100 | [diff] [blame] | 32 | SUPPORTED_PROFILES="ONAP-HONOLULU ORAN-CHERRY ORAN-DAWN" |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 33 | #Supported run modes |
| 34 | SUPPORTED_RUNMODES="DOCKER KUBE" |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 35 | |
| 36 | . ../common/testcase_common.sh $@ |
| 37 | . ../common/ecs_api_functions.sh |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 38 | . ../common/prodstub_api_functions.sh |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 39 | . ../common/cr_api_functions.sh |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 40 | . ../common/control_panel_api_functions.sh |
| 41 | . ../common/controller_api_functions.sh |
| 42 | . ../common/ricsimulator_api_functions.sh |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 43 | . ../common/http_proxy_api_functions.sh |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 44 | |
| 45 | #### TEST BEGIN #### |
| 46 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 47 | FLAT_A1_EI="1" |
| 48 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 49 | clean_environment |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 50 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 51 | use_ecs_rest_https |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 52 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 53 | use_prod_stub_https |
| 54 | |
| 55 | use_simulator_https |
| 56 | |
| 57 | use_cr_https |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 58 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 59 | #start_http_proxy #Uncomment this cmd to run with proxy |
| 60 | |
| 61 | start_ecs NOPROXY $SIM_GROUP/$ECS_COMPOSE_DIR/application.yaml #Change NOPROXY to PROXY to run with http proxy |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 62 | |
| 63 | if [ $RUNMODE == "KUBE" ]; then |
| 64 | ecs_api_admin_reset |
| 65 | fi |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 66 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 67 | start_prod_stub |
| 68 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 69 | set_ecs_trace |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 70 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 71 | start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/application.properties |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 72 | |
| 73 | if [ "$PMS_VERSION" == "V2" ]; then |
| 74 | start_ric_simulators ricsim_g3 4 STD_2.0.0 |
| 75 | fi |
| 76 | |
| 77 | start_cr |
| 78 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 79 | CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK" |
| 80 | CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 81 | TARGET1="$RIC_SIM_HTTPX://ricsim_g3_1:$RIC_SIM_PORT/datadelivery" |
| 82 | TARGET2="$RIC_SIM_HTTPX://ricsim_g3_2:$RIC_SIM_PORT/datadelivery" |
| 83 | TARGET3="$RIC_SIM_HTTPX://ricsim_g3_3:$RIC_SIM_PORT/datadelivery" |
| 84 | TARGET8="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery" |
| 85 | TARGET10="$RIC_SIM_HTTPX://ricsim_g3_4:$RIC_SIM_PORT/datadelivery" |
| 86 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 87 | STATUS1="$CR_SERVICE_PATH/job1-status" |
| 88 | STATUS2="$CR_SERVICE_PATH/job2-status" |
| 89 | STATUS3="$CR_SERVICE_PATH/job3-status" |
| 90 | STATUS8="$CR_SERVICE_PATH/job8-status" |
| 91 | STATUS10="$CR_SERVICE_PATH/job10-status" |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 92 | |
| 93 | ### Setup prodstub sim to accept calls for producers, types and jobs |
| 94 | ## prod-a type1 |
| 95 | ## prod-b type1 and type2 |
| 96 | ## prod-c no-type |
| 97 | ## prod-d type4 |
| 98 | ## prod-e type6 |
| 99 | ## prod-f type6 |
| 100 | |
| 101 | ## job1 -> prod-a |
| 102 | ## job2 -> prod-a |
| 103 | ## job3 -> prod-b |
| 104 | ## job4 -> prod-a |
| 105 | ## job6 -> prod-b |
| 106 | ## job8 -> prod-d |
| 107 | ## job10 -> prod-e and prod-f |
| 108 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 109 | prodstub_arm_producer 200 prod-a |
| 110 | prodstub_arm_producer 200 prod-b |
| 111 | prodstub_arm_producer 200 prod-c |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 112 | prodstub_arm_producer 200 prod-d |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 113 | prodstub_arm_producer 200 prod-e |
| 114 | prodstub_arm_producer 200 prod-f |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 115 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 116 | prodstub_arm_type 200 prod-a type1 |
| 117 | prodstub_arm_type 200 prod-b type2 |
| 118 | prodstub_arm_type 200 prod-b type3 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 119 | prodstub_arm_type 200 prod-d type4 |
| 120 | prodstub_arm_type 200 prod-e type6 |
| 121 | prodstub_arm_type 200 prod-f type6 |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 122 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 123 | prodstub_disarm_type 200 prod-b type3 |
| 124 | prodstub_arm_type 200 prod-b type1 |
| 125 | prodstub_disarm_type 200 prod-b type1 |
| 126 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 127 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 128 | prodstub_arm_job_create 200 prod-a job1 |
| 129 | prodstub_arm_job_create 200 prod-a job2 |
| 130 | prodstub_arm_job_create 200 prod-b job3 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 131 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 132 | prodstub_arm_job_delete 200 prod-a job1 |
| 133 | prodstub_arm_job_delete 200 prod-a job2 |
| 134 | prodstub_arm_job_delete 200 prod-b job3 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 135 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 136 | prodstub_arm_job_create 200 prod-b job4 |
| 137 | prodstub_arm_job_create 200 prod-a job4 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 138 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 139 | prodstub_arm_job_create 200 prod-b job6 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 140 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 141 | prodstub_arm_job_create 200 prod-d job8 |
| 142 | |
| 143 | prodstub_arm_job_create 200 prod-e job10 |
| 144 | prodstub_arm_job_create 200 prod-f job10 |
| 145 | |
| 146 | ### ecs status |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 147 | ecs_api_service_status 200 |
| 148 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 149 | cr_equal received_callbacks 0 |
| 150 | |
| 151 | ### Initial tests - no config made |
| 152 | ### GET: type ids, types, producer ids, producers, job ids, jobs |
| 153 | ### DELETE: jobs |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 154 | ecs_api_a1_get_type_ids 200 EMPTY |
| 155 | ecs_api_a1_get_type 404 test-type |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 156 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 157 | ecs_api_edp_get_type_ids 200 EMPTY |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 158 | if [ $ECS_VERSION == "V1-1" ]; then |
| 159 | ecs_api_edp_get_type 404 test-type |
| 160 | else |
| 161 | ecs_api_edp_get_type_2 404 test-type |
| 162 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 163 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 164 | if [ $ECS_VERSION == "V1-1" ]; then |
| 165 | ecs_api_edp_get_producer_ids 200 EMPTY |
| 166 | ecs_api_edp_get_producer 404 test-prod |
| 167 | else |
| 168 | ecs_api_edp_get_producer_ids_2 200 NOTYPE EMPTY |
| 169 | ecs_api_edp_get_producer_2 404 test-prod |
| 170 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 171 | ecs_api_edp_get_producer_status 404 test-prod |
| 172 | |
| 173 | ecs_api_edp_delete_producer 404 test-prod |
| 174 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 175 | if [ -z "$FLAT_A1_EI" ]; then |
| 176 | ecs_api_a1_get_job_ids 404 test-type NOWNER |
| 177 | ecs_api_a1_get_job_ids 404 test-type test-owner |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 178 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 179 | ecs_api_a1_get_job 404 test-type test-job |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 180 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 181 | ecs_api_a1_get_job_status 404 test-type test-job |
| 182 | else |
| 183 | ecs_api_a1_get_job_ids 200 test-type NOWNER EMPTY |
| 184 | ecs_api_a1_get_job_ids 200 test-type test-owner EMPTY |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 185 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 186 | ecs_api_a1_get_job 404 test-job |
| 187 | |
| 188 | ecs_api_a1_get_job_status 404 test-job |
| 189 | fi |
| 190 | |
| 191 | if [ -z "$FLAT_A1_EI" ]; then |
| 192 | ecs_api_a1_delete_job 404 test-type test-job |
| 193 | else |
| 194 | ecs_api_a1_delete_job 404 test-job |
| 195 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 196 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 197 | if [ $ECS_VERSION == "V1-1" ]; then |
| 198 | ecs_api_edp_get_producer_jobs 404 test-prod |
| 199 | else |
| 200 | ecs_api_edp_get_producer_jobs_2 404 test-prod |
| 201 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 202 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 203 | if [ $ECS_VERSION == "V1-2" ]; then |
| 204 | ecs_api_edp_get_type_2 404 test-type |
| 205 | ecs_api_edp_delete_type_2 404 test-type |
| 206 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 207 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 208 | ### Setup of producer/job and testing apis ### |
| 209 | |
| 210 | ## Setup prod-a |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 211 | if [ $ECS_VERSION == "V1-1" ]; then |
| 212 | ecs_api_edp_put_producer 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 213 | ecs_api_edp_put_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 214 | else |
| 215 | #V1-2 |
| 216 | ecs_api_edp_get_type_ids 200 EMPTY |
| 217 | ecs_api_edp_get_type_2 404 type1 |
| 218 | ecs_api_edp_put_producer_2 404 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 219 | |
| 220 | # Create type, delete and create again |
| 221 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 222 | ecs_api_edp_get_type_2 200 type1 |
| 223 | ecs_api_edp_get_type_ids 200 type1 |
| 224 | ecs_api_edp_delete_type_2 204 type1 |
| 225 | ecs_api_edp_get_type_2 404 type1 |
| 226 | ecs_api_edp_get_type_ids 200 EMPTY |
| 227 | ecs_api_edp_put_type_2 201 type1 testdata/ecs/ei-type-1.json |
| 228 | ecs_api_edp_get_type_ids 200 type1 |
| 229 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json |
| 230 | |
| 231 | ecs_api_edp_put_producer_2 201 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 232 | ecs_api_edp_put_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 233 | |
| 234 | ecs_api_edp_delete_type_2 406 type1 |
| 235 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 236 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 237 | |
| 238 | ecs_api_a1_get_type_ids 200 type1 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 239 | if [ -z "$FLAT_A1_EI" ]; then |
| 240 | ecs_api_a1_get_type 200 type1 testdata/ecs/ei-type-1.json |
| 241 | else |
| 242 | ecs_api_a1_get_type 200 type1 testdata/ecs/empty-type.json |
| 243 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 244 | |
| 245 | ecs_api_edp_get_type_ids 200 type1 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 246 | if [ $ECS_VERSION == "V1-1" ]; then |
| 247 | ecs_api_edp_get_type 200 type1 testdata/ecs/ei-type-1.json prod-a |
| 248 | else |
| 249 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json |
| 250 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 251 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 252 | if [ $ECS_VERSION == "V1-1" ]; then |
| 253 | ecs_api_edp_get_producer_ids 200 prod-a |
| 254 | else |
| 255 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a |
| 256 | ecs_api_edp_get_producer_ids_2 200 type1 prod-a |
| 257 | ecs_api_edp_get_producer_ids_2 200 type2 EMPTY |
| 258 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 259 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 260 | if [ $ECS_VERSION == "V1-1" ]; then |
| 261 | ecs_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 262 | else |
| 263 | ecs_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 264 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 265 | |
| 266 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 267 | |
| 268 | ecs_api_a1_get_job_ids 200 type1 NOWNER EMPTY |
| 269 | ecs_api_a1_get_job_ids 200 type1 test-owner EMPTY |
| 270 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 271 | if [ -z "$FLAT_A1_EI" ]; then |
| 272 | ecs_api_a1_get_job 404 type1 test-job |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 273 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 274 | ecs_api_a1_get_job_status 404 type1 test-job |
| 275 | else |
| 276 | ecs_api_a1_get_job 404 test-job |
| 277 | |
| 278 | ecs_api_a1_get_job_status 404 test-job |
| 279 | fi |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 280 | if [ $ECS_VERSION == "V1-1" ]; then |
| 281 | ecs_api_edp_get_producer_jobs 200 prod-a EMPTY |
| 282 | else |
| 283 | ecs_api_edp_get_producer_jobs_2 200 prod-a EMPTY |
| 284 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 285 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 286 | ## Create a job for prod-a |
| 287 | ## job1 - prod-a |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 288 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 289 | 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] | 290 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 291 | 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] | 292 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 293 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 294 | # Check the job data in the producer |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 295 | if [ $ECS_VERSION == "V1-1" ]; then |
| 296 | prodstub_check_jobdata 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 297 | else |
| 298 | prodstub_check_jobdata_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 299 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 300 | |
| 301 | ecs_api_a1_get_job_ids 200 type1 NOWNER job1 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 302 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1 |
| 303 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 304 | if [ ! -z "$FLAT_A1_EI" ]; then |
| 305 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 |
| 306 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 307 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 308 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 309 | 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] | 310 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 311 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 312 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 313 | 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] | 314 | |
| 315 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 316 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 317 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 318 | prodstub_equal create/prod-a/job1 1 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 319 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 320 | if [ $ECS_VERSION == "V1-1" ]; then |
| 321 | ecs_api_edp_get_producer_jobs 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 322 | else |
| 323 | ecs_api_edp_get_producer_jobs_2 200 prod-a job1 type1 $TARGET1 ricsim_g3_1 testdata/ecs/job-template.json |
| 324 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 325 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 326 | ## Create a second job for prod-a |
| 327 | ## job2 - prod-a |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 328 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 329 | 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] | 330 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 331 | 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] | 332 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 333 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 334 | # Check the job data in the producer |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 335 | if [ $ECS_VERSION == "V1-1" ]; then |
| 336 | prodstub_check_jobdata 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 337 | else |
| 338 | prodstub_check_jobdata_2 200 prod-a job2 type1 $TARGET2 ricsim_g3_2 testdata/ecs/job-template.json |
| 339 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 340 | ecs_api_a1_get_job_ids 200 type1 NOWNER job1 job2 |
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 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2 |
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 job2 |
| 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 job2 $TARGET2 ricsim_g3_2 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 job2 ENABLED |
| 351 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 352 | 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] | 353 | |
| 354 | ecs_api_a1_get_job_status 200 job2 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/job2 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 job2 type1 $TARGET2 ricsim_g3_2 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 job2 type1 $TARGET2 ricsim_g3_2 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 | ## Setup prod-b |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 366 | if [ $ECS_VERSION == "V1-1" ]; then |
| 367 | ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 368 | else |
| 369 | ecs_api_edp_put_type_2 201 type2 testdata/ecs/ei-type-2.json |
| 370 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 371 | fi |
| 372 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 373 | |
| 374 | ecs_api_a1_get_type_ids 200 type1 type2 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 375 | if [ -z "$FLAT_A1_EI" ]; then |
| 376 | ecs_api_a1_get_type 200 type1 testdata/ecs/ei-type-1.json |
| 377 | ecs_api_a1_get_type 200 type2 testdata/ecs/ei-type-2.json |
| 378 | else |
| 379 | ecs_api_a1_get_type 200 type1 testdata/ecs/empty-type.json |
| 380 | ecs_api_a1_get_type 200 type2 testdata/ecs/empty-type.json |
| 381 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 382 | |
| 383 | ecs_api_edp_get_type_ids 200 type1 type2 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 384 | if [ $ECS_VERSION == "V1-1" ]; then |
| 385 | ecs_api_edp_get_type 200 type1 testdata/ecs/ei-type-1.json prod-a |
| 386 | ecs_api_edp_get_type 200 type2 testdata/ecs/ei-type-2.json prod-b |
| 387 | else |
| 388 | ecs_api_edp_get_type_2 200 type1 testdata/ecs/ei-type-1.json |
| 389 | ecs_api_edp_get_type_2 200 type2 testdata/ecs/ei-type-2.json |
| 390 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 391 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 392 | if [ $ECS_VERSION == "V1-1" ]; then |
| 393 | ecs_api_edp_get_producer_ids 200 prod-a prod-b |
| 394 | else |
| 395 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b |
| 396 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 397 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 398 | if [ $ECS_VERSION == "V1-1" ]; then |
| 399 | ecs_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 400 | ecs_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 401 | else |
| 402 | ecs_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 403 | ecs_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 404 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 405 | |
| 406 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 407 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 408 | ## Create job for prod-b |
| 409 | ## job3 - prod-b |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 410 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 411 | 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] | 412 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 413 | 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] | 414 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 415 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 416 | prodstub_equal create/prod-b/job3 1 |
| 417 | |
| 418 | # Check the job data in the producer |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 419 | if [ $ECS_VERSION == "V1-1" ]; then |
| 420 | prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 421 | else |
| 422 | prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 423 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 424 | |
| 425 | ecs_api_a1_get_job_ids 200 type1 NOWNER job1 job2 |
| 426 | ecs_api_a1_get_job_ids 200 type2 NOWNER job3 |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 427 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_1 job1 |
| 428 | ecs_api_a1_get_job_ids 200 type1 ricsim_g3_2 job2 |
| 429 | ecs_api_a1_get_job_ids 200 type2 ricsim_g3_3 job3 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 430 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 431 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 432 | 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] | 433 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 434 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 435 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 436 | 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] | 437 | |
| 438 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 439 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 440 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 441 | if [ $ECS_VERSION == "V1-1" ]; then |
| 442 | 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 |
| 443 | ecs_api_edp_get_producer_jobs 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 444 | else |
| 445 | 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 |
| 446 | ecs_api_edp_get_producer_jobs_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 447 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 448 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 449 | ## Setup prod-c (no types) |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 450 | if [ $ECS_VERSION == "V1-1" ]; then |
| 451 | ecs_api_edp_put_producer 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE |
| 452 | else |
| 453 | ecs_api_edp_put_producer_2 201 prod-c $CB_JOB/prod-c $CB_SV/prod-c NOTYPE |
| 454 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 455 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 456 | if [ $ECS_VERSION == "V1-1" ]; then |
| 457 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 458 | else |
| 459 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 460 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 461 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 462 | if [ $ECS_VERSION == "V1-1" ]; then |
| 463 | ecs_api_edp_get_producer 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 testdata/ecs/ei-type-1.json |
| 464 | ecs_api_edp_get_producer 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 465 | ecs_api_edp_get_producer 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY |
| 466 | else |
| 467 | ecs_api_edp_get_producer_2 200 prod-a $CB_JOB/prod-a $CB_SV/prod-a type1 |
| 468 | ecs_api_edp_get_producer_2 200 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 469 | ecs_api_edp_get_producer_2 200 prod-c $CB_JOB/prod-c $CB_SV/prod-c EMPTY |
| 470 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 471 | |
| 472 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 473 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 474 | |
| 475 | ## Delete job3 and prod-b and re-create if different order |
| 476 | |
| 477 | # Delete job then producer |
| 478 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 479 | if [ $ECS_VERSION == "V1-1" ]; then |
| 480 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 481 | else |
| 482 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 483 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 484 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 485 | if [ -z "$FLAT_A1_EI" ]; then |
| 486 | ecs_api_a1_delete_job 204 type2 job3 |
| 487 | else |
| 488 | ecs_api_a1_delete_job 204 job3 |
| 489 | fi |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 490 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 491 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 492 | if [ $ECS_VERSION == "V1-1" ]; then |
| 493 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c |
| 494 | else |
| 495 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 496 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 497 | |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 498 | ecs_api_edp_delete_producer 204 prod-b |
| 499 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 500 | ecs_api_edp_get_producer_status 404 prod-b |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 501 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 502 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 |
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-c |
| 505 | else |
| 506 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c |
| 507 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 508 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 509 | prodstub_equal delete/prod-b/job3 1 |
| 510 | |
| 511 | if [ -z "$FLAT_A1_EI" ]; then |
| 512 | ecs_api_a1_put_job 404 type2 job3 $TARGET3 ricsim_g3_3 testdata/ecs/job-template.json |
| 513 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 514 | if [ $ECS_VERSION == "V1-1" ]; then |
| 515 | ecs_api_a1_put_job 404 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template.json |
| 516 | else |
| 517 | ecs_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template.json |
| 518 | ecs_api_a1_get_job_status 200 job3 DISABLED |
| 519 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 520 | fi |
| 521 | |
| 522 | # Put producer then job |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 523 | if [ $ECS_VERSION == "V1-1" ]; then |
| 524 | ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 525 | else |
| 526 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 527 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 528 | |
| 529 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 530 | |
| 531 | if [ -z "$FLAT_A1_EI" ]; then |
| 532 | ecs_api_a1_put_job 201 type2 job3 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 533 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 534 | else |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 535 | if [ $ECS_VERSION == "V1-1" ]; then |
| 536 | ecs_api_a1_put_job 201 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template2.json |
| 537 | else |
| 538 | ecs_api_a1_put_job 200 job3 type2 $TARGET3 ricsim_g3_3 $STATUS3 testdata/ecs/job-template2.json |
| 539 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 540 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 541 | fi |
| 542 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 543 | if [ $ECS_VERSION == "V1-1" ]; then |
| 544 | prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 545 | else |
| 546 | prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 547 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 548 | |
| 549 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 |
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-b prod-c |
| 552 | else |
| 553 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c |
| 554 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 555 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 556 | if [ $ECS_VERSION == "V1-1" ]; then |
| 557 | prodstub_equal create/prod-b/job3 2 |
| 558 | else |
| 559 | prodstub_equal create/prod-b/job3 3 |
| 560 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 561 | prodstub_equal delete/prod-b/job3 1 |
| 562 | |
| 563 | # Delete only the producer |
| 564 | ecs_api_edp_delete_producer 204 prod-b |
| 565 | |
| 566 | ecs_api_edp_get_producer_status 404 prod-b |
| 567 | |
| 568 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 569 | if [ $ECS_VERSION == "V1-1" ]; then |
| 570 | ecs_api_edp_get_producer_ids 200 prod-a prod-c |
| 571 | else |
| 572 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-c |
| 573 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 574 | |
| 575 | if [ -z "$FLAT_A1_EI" ]; then |
| 576 | ecs_api_a1_get_job_status 200 type2 job3 DISABLED |
| 577 | else |
| 578 | ecs_api_a1_get_job_status 200 job3 DISABLED |
| 579 | fi |
| 580 | |
| 581 | cr_equal received_callbacks 1 30 |
| 582 | cr_equal received_callbacks?id=job3-status 1 |
| 583 | cr_api_check_all_ecs_events 200 job3-status DISABLED |
| 584 | |
| 585 | # Re-create the producer |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 586 | if [ $ECS_VERSION == "V1-1" ]; then |
| 587 | ecs_api_edp_put_producer 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 testdata/ecs/ei-type-2.json |
| 588 | else |
| 589 | ecs_api_edp_put_producer_2 201 prod-b $CB_JOB/prod-b $CB_SV/prod-b type2 |
| 590 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 591 | |
| 592 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 593 | |
| 594 | if [ -z "$FLAT_A1_EI" ]; then |
| 595 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 596 | else |
| 597 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 598 | fi |
| 599 | |
| 600 | cr_equal received_callbacks 2 30 |
| 601 | cr_equal received_callbacks?id=job3-status 2 |
| 602 | cr_api_check_all_ecs_events 200 job3-status ENABLED |
| 603 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 604 | if [ $ECS_VERSION == "V1-1" ]; then |
| 605 | prodstub_check_jobdata 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 606 | else |
| 607 | prodstub_check_jobdata_2 200 prod-b job3 type2 $TARGET3 ricsim_g3_3 testdata/ecs/job-template2.json |
| 608 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 609 | |
| 610 | ## Setup prod-d |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 611 | if [ $ECS_VERSION == "V1-1" ]; then |
| 612 | ecs_api_edp_put_producer 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json |
| 613 | else |
| 614 | ecs_api_edp_put_type_2 201 type4 testdata/ecs/ei-type-1.json |
| 615 | ecs_api_edp_put_producer_2 201 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 |
| 616 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 617 | |
| 618 | ecs_api_a1_get_job_ids 200 type4 NOWNER EMPTY |
| 619 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 620 | if [ -z "$FLAT_A1_EI" ]; then |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 621 | 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] | 622 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 623 | 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] | 624 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 625 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 626 | if [ $ECS_VERSION == "V1-1" ]; then |
| 627 | prodstub_check_jobdata 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json |
| 628 | else |
| 629 | prodstub_check_jobdata_2 200 prod-d job8 type4 $TARGET8 ricsim_g3_4 testdata/ecs/job-template.json |
| 630 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 631 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 632 | prodstub_equal create/prod-d/job8 1 |
| 633 | prodstub_equal delete/prod-d/job8 0 |
| 634 | |
| 635 | ecs_api_a1_get_job_ids 200 type4 NOWNER job8 |
| 636 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 637 | if [ -z "$FLAT_A1_EI" ]; then |
| 638 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 639 | else |
| 640 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 641 | fi |
| 642 | |
| 643 | # Re-PUT the producer with zero types |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 644 | if [ $ECS_VERSION == "V1-1" ]; then |
| 645 | ecs_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE |
| 646 | else |
| 647 | ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d NOTYPE |
| 648 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 649 | |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 650 | if [ -z "$FLAT_A1_EI" ]; then |
| 651 | ecs_api_a1_get_job_ids 404 type4 NOWNER |
| 652 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 653 | ecs_api_a1_get_job_ids 200 type4 NOWNER job8 |
| 654 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 655 | fi |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 656 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 657 | if [ -z "$FLAT_A1_EI" ]; then |
| 658 | ecs_api_a1_get_job_status 200 type4 job8 DISABLED |
| 659 | else |
| 660 | ecs_api_a1_get_job_status 200 job8 DISABLED |
| 661 | fi |
| 662 | |
| 663 | cr_equal received_callbacks 3 30 |
| 664 | cr_equal received_callbacks?id=job8-status 1 |
| 665 | cr_api_check_all_ecs_events 200 job8-status DISABLED |
| 666 | |
BjornMagnussonXA | 39ad50e | 2020-10-22 09:55:25 +0200 | [diff] [blame] | 667 | prodstub_equal create/prod-d/job8 1 |
| 668 | prodstub_equal delete/prod-d/job8 0 |
| 669 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 670 | ## Re-setup prod-d |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 671 | if [ $ECS_VERSION == "V1-1" ]; then |
| 672 | ecs_api_edp_put_producer 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 testdata/ecs/ei-type-4.json |
| 673 | else |
| 674 | ecs_api_edp_put_type_2 200 type4 testdata/ecs/ei-type-4.json |
| 675 | ecs_api_edp_put_producer_2 200 prod-d $CB_JOB/prod-d $CB_SV/prod-d type4 |
| 676 | fi |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 677 | |
| 678 | if [ -z "$FLAT_A1_EI" ]; then |
| 679 | ecs_api_a1_get_job_ids 404 type4 NOWNER |
| 680 | else |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 681 | ecs_api_a1_get_job_ids 200 type4 NOWNER job8 |
| 682 | ecs_api_a1_get_job_ids 200 NOTYPE NOWNER job1 job2 job3 job8 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 683 | fi |
| 684 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 685 | if [ -z "$FLAT_A1_EI" ]; then |
| 686 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 687 | else |
| 688 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 689 | fi |
| 690 | |
| 691 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 692 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 693 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 694 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 695 | |
| 696 | cr_equal received_callbacks 4 30 |
| 697 | cr_equal received_callbacks?id=job8-status 2 |
| 698 | cr_api_check_all_ecs_events 200 job8-status ENABLED |
| 699 | |
| 700 | prodstub_equal create/prod-d/job8 2 |
| 701 | prodstub_equal delete/prod-d/job8 0 |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 702 | |
| 703 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 704 | ## Setup prod-e |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 705 | if [ $ECS_VERSION == "V1-1" ]; then |
| 706 | ecs_api_edp_put_producer 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6 testdata/ecs/ei-type-6.json |
| 707 | else |
| 708 | ecs_api_edp_put_type_2 201 type6 testdata/ecs/ei-type-6.json |
| 709 | ecs_api_edp_put_producer_2 201 prod-e $CB_JOB/prod-e $CB_SV/prod-e type6 |
| 710 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 711 | |
| 712 | ecs_api_a1_get_job_ids 200 type6 NOWNER EMPTY |
| 713 | |
| 714 | if [ -z "$FLAT_A1_EI" ]; then |
| 715 | ecs_api_a1_put_job 201 type6 job10 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 716 | else |
| 717 | ecs_api_a1_put_job 201 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ecs/job-template.json |
| 718 | fi |
| 719 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 720 | if [ $ECS_VERSION == "V1-1" ]; then |
| 721 | prodstub_check_jobdata 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 722 | else |
| 723 | prodstub_check_jobdata_2 200 prod-e job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 724 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 725 | |
| 726 | prodstub_equal create/prod-e/job10 1 |
| 727 | prodstub_equal delete/prod-e/job10 0 |
| 728 | |
| 729 | ecs_api_a1_get_job_ids 200 type6 NOWNER job10 |
| 730 | |
| 731 | if [ -z "$FLAT_A1_EI" ]; then |
| 732 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 733 | else |
| 734 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 735 | fi |
| 736 | |
| 737 | ## Setup prod-f |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 738 | if [ $ECS_VERSION == "V1-1" ]; then |
| 739 | ecs_api_edp_put_producer 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6 testdata/ecs/ei-type-6.json |
| 740 | else |
| 741 | ecs_api_edp_put_type_2 200 type6 testdata/ecs/ei-type-6.json |
| 742 | ecs_api_edp_put_producer_2 201 prod-f $CB_JOB/prod-f $CB_SV/prod-f type6 |
| 743 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 744 | |
| 745 | ecs_api_a1_get_job_ids 200 type6 NOWNER job10 |
| 746 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 747 | if [ $ECS_VERSION == "V1-1" ]; then |
| 748 | prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 749 | else |
| 750 | prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template.json |
| 751 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 752 | |
| 753 | prodstub_equal create/prod-f/job10 1 |
| 754 | prodstub_equal delete/prod-f/job10 0 |
| 755 | |
| 756 | ecs_api_a1_get_job_ids 200 type6 NOWNER job10 |
| 757 | |
| 758 | if [ -z "$FLAT_A1_EI" ]; then |
| 759 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 760 | else |
| 761 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 762 | fi |
| 763 | |
| 764 | ## Status updates prod-a and jobs |
| 765 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 766 | if [ $ECS_VERSION == "V1-1" ]; then |
| 767 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 768 | else |
| 769 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 770 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 771 | |
| 772 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 773 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 774 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 775 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 776 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 777 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 778 | |
| 779 | # Arm producer prod-a for supervision failure |
| 780 | prodstub_arm_producer 200 prod-a 400 |
| 781 | |
| 782 | # Wait for producer prod-a to go disabled |
| 783 | ecs_api_edp_get_producer_status 200 prod-a DISABLED 360 |
| 784 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 785 | if [ $ECS_VERSION == "V1-1" ]; then |
| 786 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 787 | else |
| 788 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 789 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 790 | |
| 791 | ecs_api_edp_get_producer_status 200 prod-a DISABLED |
| 792 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 793 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 794 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 795 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 796 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 797 | |
| 798 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 799 | if [ -z "$FLAT_A1_EI" ]; then |
| 800 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 801 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 802 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 803 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 804 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 805 | else |
| 806 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 807 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 808 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 809 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 810 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 811 | fi |
BjornMagnussonXA | 4207b83 | 2020-11-03 09:52:49 +0100 | [diff] [blame] | 812 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 813 | # Arm producer prod-a for supervision |
| 814 | prodstub_arm_producer 200 prod-a 200 |
| 815 | |
| 816 | # Wait for producer prod-a to go enabled |
| 817 | ecs_api_edp_get_producer_status 200 prod-a ENABLED 360 |
| 818 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 819 | if [ $ECS_VERSION == "V1-1" ]; then |
| 820 | ecs_api_edp_get_producer_ids 200 prod-a prod-b prod-c prod-d prod-e prod-f |
| 821 | else |
| 822 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-a prod-b prod-c prod-d prod-e prod-f |
| 823 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 824 | |
| 825 | ecs_api_edp_get_producer_status 200 prod-a ENABLED |
| 826 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 827 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 828 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 829 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 830 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 831 | |
| 832 | if [ -z "$FLAT_A1_EI" ]; then |
| 833 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 834 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 835 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 836 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 837 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 838 | else |
| 839 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 840 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 841 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 842 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 843 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 844 | fi |
| 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 |
| 864 | |
| 865 | if [ -z "$FLAT_A1_EI" ]; then |
| 866 | ecs_api_a1_get_job_status 200 type1 job1 ENABLED |
| 867 | ecs_api_a1_get_job_status 200 type1 job2 ENABLED |
| 868 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 869 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 870 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 871 | else |
| 872 | ecs_api_a1_get_job_status 200 job1 ENABLED |
| 873 | ecs_api_a1_get_job_status 200 job2 ENABLED |
| 874 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 875 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 876 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 877 | fi |
| 878 | |
| 879 | # Wait for producer prod-a to be removed |
| 880 | ecs_equal json:ei-producer/v1/eiproducers 5 1000 |
| 881 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 882 | if [ $ECS_VERSION == "V1-1" ]; then |
| 883 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f |
| 884 | else |
| 885 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f |
| 886 | fi |
| 887 | |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 888 | |
| 889 | ecs_api_edp_get_producer_status 404 prod-a |
| 890 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 891 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 892 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 893 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 894 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 895 | |
| 896 | if [ -z "$FLAT_A1_EI" ]; then |
| 897 | ecs_api_a1_get_job_status 200 type1 job1 DISABLED |
| 898 | ecs_api_a1_get_job_status 200 type1 job2 DISABLED |
| 899 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 900 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 901 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 902 | else |
| 903 | ecs_api_a1_get_job_status 200 job1 DISABLED |
| 904 | ecs_api_a1_get_job_status 200 job2 DISABLED |
| 905 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 906 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 907 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 908 | fi |
| 909 | |
| 910 | cr_equal received_callbacks 6 30 |
| 911 | cr_equal received_callbacks?id=job1-status 1 |
| 912 | cr_equal received_callbacks?id=job2-status 1 |
| 913 | |
| 914 | cr_api_check_all_ecs_events 200 job1-status DISABLED |
| 915 | cr_api_check_all_ecs_events 200 job2-status DISABLED |
| 916 | |
| 917 | |
| 918 | # Arm producer prod-e for supervision failure |
| 919 | prodstub_arm_producer 200 prod-e 400 |
| 920 | |
| 921 | ecs_api_edp_get_producer_status 200 prod-e DISABLED 1000 |
| 922 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 923 | if [ $ECS_VERSION == "V1-1" ]; then |
| 924 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f |
| 925 | else |
| 926 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f |
| 927 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 928 | |
| 929 | ecs_api_edp_get_producer_status 404 prod-a |
| 930 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 931 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 932 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 933 | ecs_api_edp_get_producer_status 200 prod-e DISABLED |
| 934 | ecs_api_edp_get_producer_status 200 prod-f ENABLED |
| 935 | |
| 936 | if [ -z "$FLAT_A1_EI" ]; then |
| 937 | ecs_api_a1_get_job_status 200 type1 job1 DISABLED |
| 938 | ecs_api_a1_get_job_status 200 type1 job2 DISABLED |
| 939 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 940 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 941 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 942 | else |
| 943 | ecs_api_a1_get_job_status 200 job1 DISABLED |
| 944 | ecs_api_a1_get_job_status 200 job2 DISABLED |
| 945 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 946 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 947 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 948 | fi |
| 949 | |
| 950 | #Disable create for job10 in prod-e |
| 951 | prodstub_arm_job_create 200 prod-e job10 400 |
| 952 | |
| 953 | #Update tjob 10 - only prod-f will be updated |
| 954 | if [ -z "$FLAT_A1_EI" ]; then |
| 955 | ecs_api_a1_put_job 200 type6 job10 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 956 | else |
| 957 | ecs_api_a1_put_job 200 job10 type6 $TARGET10 ricsim_g3_4 $STATUS10 testdata/ecs/job-template2.json |
| 958 | fi |
| 959 | #Reset producer and job responses |
| 960 | prodstub_arm_producer 200 prod-e 200 |
| 961 | prodstub_arm_job_create 200 prod-e job10 200 |
| 962 | |
| 963 | ecs_api_edp_get_producer_status 200 prod-e ENABLED 360 |
| 964 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 965 | if [ $ECS_VERSION == "V1-1" ]; then |
| 966 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e prod-f |
| 967 | else |
| 968 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e prod-f |
| 969 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 970 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 971 | #Wait for job to be updated |
| 972 | sleep_wait 120 |
| 973 | |
BjornMagnussonXA | c963b73 | 2021-01-20 14:24:13 +0100 | [diff] [blame] | 974 | if [ $ECS_VERSION == "V1-1" ]; then |
| 975 | prodstub_check_jobdata 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 976 | else |
| 977 | prodstub_check_jobdata_2 200 prod-f job10 type6 $TARGET10 ricsim_g3_4 testdata/ecs/job-template2.json |
| 978 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 979 | |
| 980 | prodstub_arm_producer 200 prod-f 400 |
| 981 | |
| 982 | ecs_api_edp_get_producer_status 200 prod-f DISABLED 360 |
| 983 | |
| 984 | ecs_equal json:ei-producer/v1/eiproducers 4 1000 |
| 985 | |
BjornMagnussonXA | 27db02f | 2021-01-19 08:13:00 +0100 | [diff] [blame] | 986 | if [ $ECS_VERSION == "V1-1" ]; then |
| 987 | ecs_api_edp_get_producer_ids 200 prod-b prod-c prod-d prod-e |
| 988 | else |
| 989 | ecs_api_edp_get_producer_ids_2 200 NOTYPE prod-b prod-c prod-d prod-e |
| 990 | fi |
BjornMagnussonXA | 7b36db6 | 2020-11-23 10:57:57 +0100 | [diff] [blame] | 991 | |
| 992 | ecs_api_edp_get_producer_status 404 prod-a |
| 993 | ecs_api_edp_get_producer_status 200 prod-b ENABLED |
| 994 | ecs_api_edp_get_producer_status 200 prod-c ENABLED |
| 995 | ecs_api_edp_get_producer_status 200 prod-d ENABLED |
| 996 | ecs_api_edp_get_producer_status 200 prod-e ENABLED |
| 997 | ecs_api_edp_get_producer_status 404 prod-f |
| 998 | |
| 999 | if [ -z "$FLAT_A1_EI" ]; then |
| 1000 | ecs_api_a1_get_job_status 200 type1 job1 DISABLED |
| 1001 | ecs_api_a1_get_job_status 200 type1 job2 DISABLED |
| 1002 | ecs_api_a1_get_job_status 200 type2 job3 ENABLED |
| 1003 | ecs_api_a1_get_job_status 200 type4 job8 ENABLED |
| 1004 | ecs_api_a1_get_job_status 200 type6 job10 ENABLED |
| 1005 | else |
| 1006 | ecs_api_a1_get_job_status 200 job1 DISABLED |
| 1007 | ecs_api_a1_get_job_status 200 job2 DISABLED |
| 1008 | ecs_api_a1_get_job_status 200 job3 ENABLED |
| 1009 | ecs_api_a1_get_job_status 200 job8 ENABLED |
| 1010 | ecs_api_a1_get_job_status 200 job10 ENABLED |
| 1011 | fi |
| 1012 | |
| 1013 | cr_equal received_callbacks 6 |
BjornMagnussonXA | f38e1e8 | 2020-10-11 23:05:02 +0200 | [diff] [blame] | 1014 | |
| 1015 | check_ecs_logs |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 1016 | |
| 1017 | store_logs END |
| 1018 | |
| 1019 | #### TEST COMPLETE #### |
| 1020 | |
BjornMagnussonXA | bf3700b | 2020-10-05 08:39:40 +0200 | [diff] [blame] | 1021 | print_result |
| 1022 | |
BjornMagnussonXA | e0b665e | 2021-01-08 22:19:18 +0100 | [diff] [blame] | 1023 | auto_clean_environment |