CR_INSTANCE_KUBE=$(($CR_INSTANCE-1))
echo -n " CR-$CR_INSTANCE_KUBE $CR_APP_NAME-$CR_INSTANCE_KUBE $KUBE_SIM_NAMESPACE "
else
- echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}_cr_$CR_INSTANCE "
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}_cr_$CR_INSTANCE "
+ else
+ echo -n " CR_$CR_INSTANCE ${CR_APP_NAME}-cr-$CR_INSTANCE "
+ fi
fi
done
}
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__CR_test_requirements() {
+ :
+}
+
#######################################################
################
__cr_set_protocoll() {
echo -e $BOLD"$CR_DISPLAY_NAME protocol setting"$EBOLD
- echo -e " Using $BOLD http $EBOLD towards $CR_DISPLAY_NAME"
+ echo -e " Using $BOLD $1 $EBOLD towards $CR_DISPLAY_NAME"
## Access to Dmaap adapter
for ((CR_INSTANCE=0; CR_INSTANCE<$MAX_CR_APP_COUNT; CR_INSTANCE++ )); do
CR_DOCKER_INSTANCE=$(($CR_INSTANCE+1))
# CR_SERVICE_PATH is the base path to cr
- __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"_cr_"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"_cr_"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy
+ else
+ __CR_SERVICE_PATH=$1"://"$CR_APP_NAME"-cr-"${CR_DOCKER_INSTANCE}":"$2 # docker access, container->container and script->container via proxy
+ fi
if [ $RUNMODE == "KUBE" ]; then
__CR_SERVICE_PATH=$1"://"$CR_APP_NAME"-"$CR_INSTANCE.$CR_APP_NAME"."$KUBE_SIM_NAMESPACE":"$3 # kube access, pod->svc and script->svc via proxy
fi
app_data=""
cntr=1
while [ $cntr -le $CR_APP_COUNT ]; do
- app=$CR_APP_NAME"_cr_"$cntr
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ app=$CR_APP_NAME"_cr_"$cntr
+ else
+ app=$CR_APP_NAME"-cr-"$cntr
+ fi
app_data="$app_data $app"
let cntr=cntr+1
done
cntr=1 #Counter for docker instance, starts on 1
cntr2=0 #Couter for env var name, starts with 0 to be compablible with kube
while [ $cntr -le $CR_APP_COUNT ]; do
- app=$CR_APP_NAME"_cr_"$cntr
+ if [ $DOCKER_COMPOSE_VERION == "V1" ]; then
+ app=$CR_APP_NAME"_cr_"$cntr
+ else
+ app=$CR_APP_NAME"-cr-"$cntr
+ fi
__dynvar="CR_SERVICE_PATH_"$cntr2
__check_service_start $app ${!__dynvar}$CR_ALIVE_URL
let cntr=cntr+1
return 0
}
-# CR API: Check the contents of all current status events for one id from ECS
+# CR API: Check the contents of all current status events for one id from ICS
# <response-code> <cr-path-id> <id> [ EMPTY | ( <status> )+ ]
# (Function for test scripts)
-cr_api_check_all_ecs_events() {
+cr_api_check_all_ics_events() {
__log_test_start $@
if [ $# -lt 3 ]; then
return 0
}
-# CR API: Check the contents of all current type subscription events for one id from ECS
+# CR API: Check the contents of all current type subscription events for one id from ICS
# <response-code> <cr-path-id> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]
# (Function for test scripts)
-cr_api_check_all_ecs_subscription_events() {
+cr_api_check_all_ics_subscription_events() {
__log_test_start $@
#Valid number of parameter 3,4,8,12
cr_api_reset() {
__log_conf_start $@
- if [ $# -ne 0 ]; then
+ if [ $# -ne 1 ]; then
__print_err "<cr-path-id>" $@
return 1
fi