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