TC_ONELINE_DESCR="ICS full interfaces walkthrough - with or without istio enabled"
-USE_ISTIO=1
+USE_ISTIO=0
#App names to include in the test when running docker, space separated list
DOCKER_INCLUDED_IMAGES="ICS PRODSTUB CR RICSIM CP HTTPPROXY NGW KUBEPROXY"
CONDITIONALLY_IGNORED_IMAGES="NGW"
#Supported test environment profiles
-SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
+SUPPORTED_PROFILES="ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ONAP-KOHN ONAP-LONDON ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE ORAN-G-RELEASE"
#Supported run modes
SUPPORTED_RUNMODES="DOCKER KUBE"
clean_environment
+if [ $RUNMODE != "KUBE" ]; then
+ USE_ISTIO=0
+ echo "ISTIO not supported by docker - setting USE-ISTIO=0"
+fi
+
if [ $USE_ISTIO -eq 1 ]; then
echo -e $RED"#########################################"$ERED
echo -e $RED"# Work around istio jwks cache"$ERED
__kube_scale deployment istiod istio-system 1
echo -e $RED"# Cycle istiod done"
echo -e $RED"#########################################"$ERED
+ echo ""
istio_enable_istio_namespace $KUBE_SIM_NAMESPACE
istio_enable_istio_namespace $KUBE_NONRTRIC_NAMESPACE
+ istio_enable_istio_namespace $KUBE_A1SIM_NAMESPACE
fi
start_kube_proxy
keycloak_api_create_confidential_client nrtrealm icsc
keycloak_api_generate_client_secret nrtrealm icsc
keycloak_api_get_client_secret nrtrealm icsc
+ keycloak_api_create_client_roles nrtrealm icsc nrtrole
+ keycloak_api_map_client_roles nrtrealm icsc nrtrole
keycloak_api_get_client_token nrtrealm icsc
istio_auth_policy_by_issuer $PROD_STUB_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY
istio_req_auth_by_jwksuri $PROD_STUB_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm
- istio_auth_policy_by_realm $PROD_STUB_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm
+ istio_auth_policy_by_realm $PROD_STUB_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm icsc nrtrole
istio_req_auth_by_jwks $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY "$KUBE_PROXY_ISTIO_JWKS_KEYS"
istio_auth_policy_by_issuer $CR_APP_NAME $KUBE_SIM_NAMESPACE KUBEPROXY
istio_req_auth_by_jwksuri $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm
- istio_auth_policy_by_realm $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm
+ istio_auth_policy_by_realm $CR_APP_NAME $KUBE_SIM_NAMESPACE nrtrealm icsc nrtrole
ics_configure_sec nrtrealm icsc $ICS_SEC
start_cr 1
+if [ $USE_ISTIO -eq 1 ]; then
+ echo "Sleep 120 to let istio settle - enabling istio on workloads may cause initial dns disturbances - temporary unavailable dns names"
+ sleep 120
+fi
+
CB_JOB="$PROD_STUB_SERVICE_PATH$PROD_STUB_JOB_CALLBACK"
CB_SV="$PROD_STUB_SERVICE_PATH$PROD_STUB_SUPERVISION_CALLBACK"
#Targets for ei jobs
ics_api_edp_put_producer_2 201 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
ics_api_edp_put_producer_2 200 prod-ia $CB_JOB/prod-ia $CB_SV/prod-ia type101
-if [[ "$ICS_FEATURE_LEVEL" == *"RESP_CODE_CHANGE_1" ]]; then
+if [[ "$ICS_FEATURE_LEVEL" == *"RESP_CODE_CHANGE_1"* ]]; then
ics_api_edp_delete_type_2 409 type101
else
ics_api_edp_delete_type_2 406 type101
cr_equal 0 received_callbacks 12
fi
### Test of pre and post validation
+if [[ "$ICS_FEATURE_LEVEL" != *"DEFAULT_TYPE_VALIDATION"* ]]; then
+ ics_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106
+ ics_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
+ ics_api_idc_put_job 201 job160 type160 $TARGET160 info-owner-1 $INFOSTATUS160 testdata/ics/job-template.json
-ics_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106
-ics_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
-ics_api_idc_put_job 201 job160 type160 $TARGET160 info-owner-1 $INFOSTATUS160 testdata/ics/job-template.json
-ics_api_idc_get_job_status2 404 job150
-ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
+ ics_api_idc_get_job_status2 404 job150
+ ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
-prodstub_arm_producer 200 prod-ig
-prodstub_arm_job_create 200 prod-ig job150
-prodstub_arm_job_create 200 prod-ig job160
+ prodstub_arm_producer 200 prod-ig
+ prodstub_arm_job_create 200 prod-ig job150
+ prodstub_arm_job_create 200 prod-ig job160
-ics_api_edp_put_producer_2 201 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig NOTYPE
-ics_api_edp_get_producer_status 200 prod-ig ENABLED 360
+ ics_api_edp_put_producer_2 201 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig NOTYPE
+ ics_api_edp_get_producer_status 200 prod-ig ENABLED 360
-ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig EMPTY
+ ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig EMPTY
-ics_api_idc_get_job_status2 404 job150
-ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
+ ics_api_idc_get_job_status2 404 job150
+ ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
+else
+ ics_api_idc_get_type_ids 200 type1 type2 type4 type6 type101 type102 type104 type106
+ ics_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
+
+ ics_api_idc_get_job_status2 404 job150
+
+ prodstub_arm_producer 200 prod-ig
+ prodstub_arm_job_create 200 prod-ig job150
+ prodstub_arm_job_create 200 prod-ig job160
+
+ ics_api_edp_put_producer_2 201 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig NOTYPE
+ ics_api_edp_get_producer_status 200 prod-ig ENABLED 360
+
+ ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig EMPTY
+
+ ics_api_idc_get_job_status2 404 job150
+ #ics_api_idc_get_job_status2 200 job160 DISABLED EMPTYPROD 60
+fi
prodstub_arm_type 200 prod-ig type160
ics_api_idc_put_job 404 job150 type150 $TARGET150 info-owner-1 $INFOSTATUS150 testdata/ics/job-template.json VALIDATE
ics_api_idc_get_job_status2 404 job150
-ics_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig 60
+if [[ "$ICS_FEATURE_LEVEL" != *"DEFAULT_TYPE_VALIDATION"* ]]; then
+ ics_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig 60
-prodstub_check_jobdata_3 200 prod-ig job160 type160 $TARGET160 info-owner-1 testdata/ics/job-template.json
+ prodstub_check_jobdata_3 200 prod-ig job160 type160 $TARGET160 info-owner-1 testdata/ics/job-template.json
-prodstub_equal create/prod-ig/job160 1
-prodstub_equal delete/prod-ig/job160 0
+ prodstub_equal create/prod-ig/job160 1
+ prodstub_equal delete/prod-ig/job160 0
+fi
prodstub_arm_type 200 prod-ig type150
ics_api_edp_get_producer_2 200 prod-ig $CB_JOB/prod-ig $CB_SV/prod-ig type160 type150
+if [[ "$ICS_FEATURE_LEVEL" == *"DEFAULT_TYPE_VALIDATION"* ]]; then
+ ics_api_idc_put_job 201 job160 type160 $TARGET160 info-owner-1 $INFOSTATUS160 testdata/ics/job-template.json
+fi
+
ics_api_idc_get_job_status2 404 job150
ics_api_idc_get_job_status2 200 job160 ENABLED 1 prod-ig
if [[ "$ICS_FEATURE_LEVEL" == *"TYPE-SUBSCRIPTIONS"* ]]; then
- if [[ "$ICS_FEATURE_LEVEL" == *"RESP_CODE_CHANGE_1" ]]; then
+ if [[ "$ICS_FEATURE_LEVEL" == *"RESP_CODE_CHANGE_1"* ]]; then
ics_api_edp_delete_type_2 409 type104
else
ics_api_edp_delete_type_2 406 type104