Updated image tags for tests
Updated python req for simulators
Configurable basepath for hostpath persistent volumes
Issue-ID: NONRTRIC-728
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: I352cf68afd655b1c458f77de4c70e87ba083bb3d
diff --git a/test/auto-test/FTC1800.sh b/test/auto-test/FTC1800.sh
index 1284bf6..749ba82 100755
--- a/test/auto-test/FTC1800.sh
+++ b/test/auto-test/FTC1800.sh
@@ -26,7 +26,7 @@
#App names to include in the test when running kubernetes, space separated list
KUBE_INCLUDED_IMAGES="ICS PRODSTUB CP CR KUBEPROXY NGW"
#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
-KUBE_PRESTARTED_IMAGES="NGW"
+KUBE_PRESTARTED_IMAGES=""
#Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
#the image is not configured in the supplied env_file
diff --git a/test/auto-test/FTC3000.sh b/test/auto-test/FTC3000.sh
index 6a1428d..4031f49 100755
--- a/test/auto-test/FTC3000.sh
+++ b/test/auto-test/FTC3000.sh
@@ -165,6 +165,7 @@
EXPECTED_DATA_DELIV=0 #Total delivered msg per CR
+EXPECTED_BATCHES_DELIV=0 #Total delivered batches per CR
DATA_DELIV_JOBS=0 #Total delivered msg per job per CR
mr_api_generate_json_payload_file 1 ./tmp/data_for_dmaap_test.json
@@ -173,43 +174,48 @@
## Send json file via message-router to adapter
DATA_DELIV_JOBS=5 #Each job will eventuall get 2 msgs
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapadp.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapadp.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapadp.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapadp.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapadp.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
# Check received data callbacks from adapter
@@ -227,48 +233,53 @@
## Send text file via message-router to adapter kafka
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapadp_kafka.text/counters/sent 1 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapadp_kafka.text/counters/sent 2 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapadp_kafka.text/counters/sent 3 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapadp_kafka.text/counters/sent 4 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapadp_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapadp_kafka.text/counters/sent 5 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
# Check received data callbacks from adapter kafka
@@ -285,43 +296,48 @@
## Send json file via message-router to mediator
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapmed.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapmed.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapmed.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapmed.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
mr_api_send_json_file "/events/unauthenticated.dmaapmed.json" ./tmp/data_for_dmaap_test.json
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
# Check received data callbacks from mediator
@@ -339,48 +355,53 @@
## Send text file via message-router to mediator kafka
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+ EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapmed_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapmed_kafka.text/counters/sent 1 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+ EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapmed_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapmed_kafka.text/counters/sent 2 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+ EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapmed_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapmed_kafka.text/counters/sent 3 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+ EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapmed_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapmed_kafka.text/counters/sent 4 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
EXPECTED_DATA_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_DATA_DELIV))
+ EXPECTED_BATCHES_DELIV=$(($NUM_JOBS/$NUM_CR+$EXPECTED_BATCHES_DELIV))
kafkapc_api_post_msg_from_file 200 "unauthenticated.dmaapmed_kafka.text" "text/plain" ./tmp/data_for_dmaap_test.txt
kafkapc_equal topics/unauthenticated.dmaapmed_kafka.text/counters/sent 5 30
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
+ cr_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV 60
done
# Check received data callbacks from adapter kafka
@@ -399,6 +420,13 @@
mr_api_send_json "/events/unauthenticated.dmaapadp.json" '{"msg":"msg-1"}'
mr_api_send_json "/events/unauthenticated.dmaapadp.json" '{"msg":"msg-3"}'
+#########################################################
+#Checking number of message batches is not reliable when
+#sending several messages at the same time
+#Two messages may be send separately or to together
+#in one batch
+#########################################################
+
DATA_DELIV_JOBS=7 #Each job will eventuall get 5+2 msgs
# Wait for data recetption, adapter
@@ -407,7 +435,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
done
print_timer
@@ -422,7 +449,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
done
print_timer
@@ -436,7 +462,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 100
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 100
done
print_timer
@@ -452,7 +477,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 60
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 60
done
print_timer
fi
@@ -462,14 +486,10 @@
do
cr_index=$(($i%$NUM_CR))
cr_equal $cr_index received_callbacks?id=job-med-data$i $DATA_DELIV_JOBS
- cr_equal $cr_index received_callback_batches?id=job-med-data$i $DATA_DELIV_JOBS
cr_equal $cr_index received_callbacks?id=job-adp-data$i $DATA_DELIV_JOBS
- cr_equal $cr_index received_callback_batches?id=job-adp-data$i $DATA_DELIV_JOBS
cr_equal $cr_index received_callbacks?id=job-adp-kafka-data$i $DATA_DELIV_JOBS
- cr_equal $cr_index received_callback_batches?id=job-adp-kafka-data$i $DATA_DELIV_JOBS
if [[ "$DMAAP_MED_FEATURE_LEVEL" == *"KAFKATYPES"* ]]; then
cr_equal $cr_index received_callbacks?id=job-med-kafka-data$i $DATA_DELIV_JOBS
- cr_equal $cr_index received_callback_batches?id=job-med-kafka-data$i $DATA_DELIV_JOBS
fi
done
@@ -506,7 +526,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 100
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 100
done
print_timer
@@ -522,7 +541,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 100
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 100
done
print_timer
@@ -537,7 +555,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 100
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 100
done
print_timer
@@ -553,7 +570,6 @@
for ((i=0; i<$NUM_CR; i++))
do
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV 100
- cr_equal $i received_callback_batches $EXPECTED_DATA_DELIV 100
done
print_timer
fi
@@ -563,14 +579,10 @@
do
cr_index=$(($i%$NUM_CR))
cr_equal $cr_index received_callbacks?id=job-med-data$i 9
- cr_equal $cr_index received_callback_batches?id=job-med-data$i 9
cr_equal $cr_index received_callbacks?id=job-adp-data$i 9
- cr_equal $cr_index received_callback_batches?id=job-adp-data$i 9
cr_equal $cr_index received_callbacks?id=job-adp-kafka-data$i 9
- cr_equal $cr_index received_callback_batches?id=job-adp-kafka-data$i 9
if [[ "$DMAAP_MED_FEATURE_LEVEL" == *"KAFKATYPES"* ]]; then
cr_equal $cr_index received_callbacks?id=job-med-kafka-data$i 9
- cr_equal $cr_index received_callback_batches?id=job-med-kafka-data$i 9
fi
done
diff --git a/test/auto-test/FTC3001.sh b/test/auto-test/FTC3001.sh
index 2672d12..390df59 100755
--- a/test/auto-test/FTC3001.sh
+++ b/test/auto-test/FTC3001.sh
@@ -199,7 +199,6 @@
adp_timeout=$(($NUM_JOBS*1*2+60)) #NUM_JOBS*MIN_BUFFERTIMEOUT*2+60_SEC_DELAY
for ((i=0; i<$NUM_CR; i++))
do
- #tmp_receptio
cr_equal $i received_callbacks $EXPECTED_DATA_DELIV $adp_timeout
cr_greater_or_equal $i received_callback_batches $EXPECTED_BATCHES_DELIV
done
diff --git a/test/common/clean_kube.sh b/test/common/clean_kube.sh
index 8a0453b..f0bdfe6 100755
--- a/test/common/clean_kube.sh
+++ b/test/common/clean_kube.sh
@@ -176,7 +176,9 @@
echo "Usage: clean_kube.sh [--kubeconfig <kube-config-file>]"
}
-if [ $# -eq 1 ]; then
+if [ $# -eq 0 ]; then
+:
+elif [ $# -eq 1 ]; then
print_usage
exit
elif [ $# -eq 2 ]; then
diff --git a/test/common/clean_kube_ns.sh b/test/common/clean_kube_ns.sh
index 0a016d2..807a88a 100755
--- a/test/common/clean_kube_ns.sh
+++ b/test/common/clean_kube_ns.sh
@@ -36,7 +36,9 @@
echo "Usage: clean_kube_ns.sh [--kubeconfig <kube-config-file>]"
}
-if [ $# -eq 1 ]; then
+if [ $# -eq 0 ]; then
+:
+elif [ $# -eq 1 ]; then
print_usage
exit
elif [ $# -eq 2 ]; then
diff --git a/test/common/ics_api_functions.sh b/test/common/ics_api_functions.sh
index 05638af..a18bf72 100644
--- a/test/common/ics_api_functions.sh
+++ b/test/common/ics_api_functions.sh
@@ -192,6 +192,7 @@
export ICS_DATA_PVC_NAME=$ICS_APP_NAME"-pvc"
#Create a unique path for the pv each time to prevent a previous volume to be reused
export ICS_PV_PATH="icsdata-"$(date +%s)
+ export HOST_PATH_BASE_DIR
if [ $1 == "PROXY" ]; then
export ICS_HTTP_PROXY_CONFIG_PORT=$HTTP_PROXY_CONFIG_PORT #Set if proxy is started
@@ -285,7 +286,7 @@
# Keep the initial worker node in case the pod need to be "restarted" - must be made to the same node due to a volume mounted on the host
if [ $retcode_i -eq 0 ]; then
- __ICS_WORKER_NODE=$(kubectl get pod -l "autotest=ICS" -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.items[*].spec.nodeName}')
+ __ICS_WORKER_NODE=$(kubectl $KUBECONF get pod -l "autotest=ICS" -n $KUBE_NONRTRIC_NAMESPACE -o jsonpath='{.items[*].spec.nodeName}')
if [ -z "$__ICS_WORKER_NODE" ]; then
echo -e $YELLOW" Cannot find worker node for pod for $ICS_APP_NAME, persistency may not work"$EYELLOW
fi
@@ -394,7 +395,7 @@
return 0
fi
- # Tie the PMS to the same worker node it was initially started on
+ # Tie the ICS to the same worker node it was initially started on
# A PVC of type hostPath is mounted to PMS, for persistent storage, so the PMS must always be on the node which mounted the volume
if [ -z "$__ICS_WORKER_NODE" ]; then
echo -e $RED" No initial worker node found for pod "$RED
@@ -1104,7 +1105,8 @@
if [[ "$ICS_FEATURE_LEVEL" == *"INFO-TYPES"* ]]; then
query="/data-producer/v1/info-producers"
if [ $# -gt 1 ] && [ $2 != "NOTYPE" ]; then
- query=$query"?info_type_id=$2"
+ query=$query"?info_type_id=$2&infoTypeId=$2" #info_type_id changed to infoTypeId in F-release.
+ #Remove info_type_id when F-release is no longer supported
fi
else
query="/ei-producer/v1/eiproducers"
diff --git a/test/common/pa_api_functions.sh b/test/common/pa_api_functions.sh
index 9a0a162..dd4af66 100644
--- a/test/common/pa_api_functions.sh
+++ b/test/common/pa_api_functions.sh
@@ -209,6 +209,7 @@
##Create a unique path for the pv each time to prevent a previous volume to be reused
export POLICY_AGENT_PV_PATH="padata-"$(date +%s)
export POLICY_AGENT_CONTAINER_MNT_DIR
+ export HOST_PATH_BASE_DIR
if [ $1 == "PROXY" ]; then
export AGENT_HTTP_PROXY_CONFIG_PORT=$HTTP_PROXY_CONFIG_PORT #Set if proxy is started
diff --git a/test/common/ricsim_api_functions.sh b/test/common/ricsim_api_functions.sh
index a366a9d..01e193d 100644
--- a/test/common/ricsim_api_functions.sh
+++ b/test/common/ricsim_api_functions.sh
@@ -253,7 +253,7 @@
# Create app
input_yaml=$SIM_GROUP"/"$RIC_SIM_COMPOSE_DIR"/"app.yaml
- output_yaml=$PWD/tmp/pa_${1}_app.yaml
+ output_yaml=$PWD/tmp/ric_${1}_app.yaml
__kube_create_instance app $RIC_SIM_SET_NAME $input_yaml $output_yaml
#Using only instance from index 1 to keep compatability with docker
diff --git a/test/common/test_env-onap-istanbul.sh b/test/common/test_env-onap-istanbul.sh
index a1f59f5..89dc68b 100644
--- a/test/common/test_env-onap-istanbul.sh
+++ b/test/common/test_env-onap-istanbul.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ============LICENSE_START===============================================
-# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# Copyright (C) 2021 Nordix Foundation. All rights reserved.
# ========================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -76,10 +76,10 @@
# SDNC A1 Controller remote image and tag
SDNC_A1_CONTROLLER_IMAGE_BASE="onap/sdnc-image"
-SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.2.5-SNAPSHOT" ###CHECK THIS
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.5-STAGING-latest"
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.2.5-STAGING-latest" #Will use snapshot repo
-SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.4"
+SDNC_A1_CONTROLLER_IMAGE_TAG_LOCAL="2.2.6-SNAPSHOT" ###CHECK THIS
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.6-STAGING-latest"
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE="2.2.6-STAGING-latest" #Will use snapshot repo
+SDNC_A1_CONTROLLER_IMAGE_TAG_REMOTE_RELEASE="2.2.5"
#SDNC DB remote image and tag
#The DB is part of SDNC so handled in the same way as SDNC
diff --git a/test/common/test_env-onap-jakarta.sh b/test/common/test_env-onap-jakarta.sh
index b5b6c39..0910ce7 100644
--- a/test/common/test_env-onap-jakarta.sh
+++ b/test/common/test_env-onap-jakarta.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# ============LICENSE_START===============================================
-# Copyright (C) 2020 Nordix Foundation. All rights reserved.
+# Copyright (C) 2021 Nordix Foundation. All rights reserved.
# ========================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -86,12 +86,12 @@
SDNC_DB_IMAGE_BASE="mariadb"
SDNC_DB_IMAGE_TAG_REMOTE_PROXY="10.5"
-# ICS image and tag - used e release
+# ICS image and tag - using e release
ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.2.0"
+ICS_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.2.1"
#Note: Update var ICS_FEATURE_LEVEL if image version is changed
-# Control Panel image and tag - used e release
+# Control Panel image and tag - using e release
CONTROL_PANEL_IMAGE_BASE="o-ran-sc/nonrtric-controlpanel"
CONTROL_PANEL_IMAGE_TAG_REMOTE_RELEASE_ORAN="2.3.0"
@@ -101,7 +101,7 @@
# RAPP Catalogue image and tags - used e release
RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.1"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE_ORAN="1.0.2"
# Near RT RIC Simulator image and tags - used e release
diff --git a/test/common/test_env-oran-e-release.sh b/test/common/test_env-oran-e-release.sh
index 9a89270..f48ae6f 100755
--- a/test/common/test_env-oran-e-release.sh
+++ b/test/common/test_env-oran-e-release.sh
@@ -60,17 +60,17 @@
# Policy Agent base image and tags
POLICY_AGENT_IMAGE_BASE="o-ran-sc/nonrtric-a1-policy-management-service"
-POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.0-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
-POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.0"
-POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
+POLICY_AGENT_IMAGE_TAG_LOCAL="2.3.1-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.1-SNAPSHOT"
+POLICY_AGENT_IMAGE_TAG_REMOTE="2.3.1"
+POLICY_AGENT_IMAGE_TAG_REMOTE_RELEASE="2.3.1"
# ICS image and tags
ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE="1.2.0"
-ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
+ICS_IMAGE_TAG_LOCAL="1.2.1-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.1-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE="1.2.1"
+ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.1"
#Note: Update var ICS_FEATURE_LEVEL if image version is changed
#Control Panel image and tags
@@ -116,10 +116,10 @@
# RAPP Catalogue image and tags
RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE="1.0.1"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.0.2-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.2-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.0.2"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.2"
# Near RT RIC Simulator image and tags - same version as cherry
@@ -131,24 +131,24 @@
# DMAAP Mediator Service
DMAAP_MED_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-mediator-producer"
-DMAAP_MED_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
-DMAAP_MED_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
-DMAAP_MED_IMAGE_TAG_REMOTE="1.0.0"
-DMAAP_MED_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+DMAAP_MED_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
+DMAAP_MED_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
+DMAAP_MED_IMAGE_TAG_REMOTE="1.0.1"
+DMAAP_MED_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
# DMAAP Adapter Service
DMAAP_ADP_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-adaptor"
-DMAAP_ADP_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
-DMAAP_ADP_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
-DMAAP_ADP_IMAGE_TAG_REMOTE="1.0.0"
-DMAAP_ADP_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
+DMAAP_ADP_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
+DMAAP_ADP_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
+DMAAP_ADP_IMAGE_TAG_REMOTE="1.0.1"
+DMAAP_ADP_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
# Helm Manager
HELM_MANAGER_IMAGE_BASE="o-ran-sc/nonrtric-helm-manager"
-HELM_MANAGER_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
-HELM_MANAGER_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
-HELM_MANAGER_IMAGE_TAG_REMOTE="1.1.0"
-HELM_MANAGER_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
+HELM_MANAGER_IMAGE_TAG_LOCAL="1.1.1-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.1-SNAPSHOT"
+HELM_MANAGER_IMAGE_TAG_REMOTE="1.1.1"
+HELM_MANAGER_IMAGE_TAG_REMOTE_RELEASE="1.1.1"
#Consul remote image and tag
CONSUL_IMAGE_BASE="consul"
@@ -536,7 +536,7 @@
#MAAP_ADP_CONTAINER_MNT_DIR="/var/dmaap-adaptor-service" # Mounted dir in the container
#DMAAP_MED_ACTUATOR="/actuator/loggers/org.oransc.information" # Url for trace/debug
#DMAAP_MED_CERT_MOUNT_DIR="./cert"
-DMAAP_MED_ALIVE_URL="/status" # Base path for alive check
+DMAAP_MED_ALIVE_URL="/health_check" # Base path for alive check
DMAAP_MED_COMPOSE_DIR="dmaapmed" # Dir in simulator_group for docker-compose
#MAAP_MED_CONFIG_MOUNT_PATH="/app" # Internal container path for configuration
DMAAP_MED_DATA_MOUNT_PATH="/configs" # Path in container for data file
diff --git a/test/common/test_env-oran-f-release.sh b/test/common/test_env-oran-f-release.sh
index 3bafdb4..8051d70 100755
--- a/test/common/test_env-oran-f-release.sh
+++ b/test/common/test_env-oran-f-release.sh
@@ -67,10 +67,10 @@
# ICS image and tags
ICS_IMAGE_BASE="o-ran-sc/nonrtric-information-coordinator-service"
-ICS_IMAGE_TAG_LOCAL="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.2.0-SNAPSHOT"
-ICS_IMAGE_TAG_REMOTE="1.2.0"
-ICS_IMAGE_TAG_REMOTE_RELEASE="1.2.0"
+ICS_IMAGE_TAG_LOCAL="1.3.0-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE_SNAPSHOT="1.3.0-SNAPSHOT"
+ICS_IMAGE_TAG_REMOTE="1.3.0"
+ICS_IMAGE_TAG_REMOTE_RELEASE="1.3.0"
#Note: Update var ICS_FEATURE_LEVEL if image version is changed
#Control Panel image and tags
@@ -83,9 +83,9 @@
# Gateway image and tags
NRT_GATEWAY_IMAGE_BASE="o-ran-sc/nonrtric-gateway"
-NRT_GATEWAY_IMAGE_TAG_LOCAL="1.0.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.0-SNAPSHOT"
-NRT_GATEWAY_IMAGE_TAG_REMOTE="1.0.0"
+NRT_GATEWAY_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+NRT_GATEWAY_IMAGE_TAG_REMOTE="1.1.0"
NRT_GATEWAY_IMAGE_TAG_REMOTE_RELEASE="1.0.0"
@@ -116,18 +116,18 @@
# RAPP Catalogue image and tags
RAPP_CAT_IMAGE_BASE="o-ran-sc/nonrtric-r-app-catalogue"
-RAPP_CAT_IMAGE_TAG_LOCAL="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.0.1-SNAPSHOT"
-RAPP_CAT_IMAGE_TAG_REMOTE="1.0.1"
-RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.0.1"
+RAPP_CAT_IMAGE_TAG_LOCAL="1.1.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE_SNAPSHOT="1.1.0-SNAPSHOT"
+RAPP_CAT_IMAGE_TAG_REMOTE="1.1.0"
+RAPP_CAT_IMAGE_TAG_REMOTE_RELEASE="1.1.0"
# Near RT RIC Simulator image and tags - same version as cherry
RIC_SIM_IMAGE_BASE="o-ran-sc/a1-simulator"
RIC_SIM_IMAGE_TAG_LOCAL="latest"
-RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.2.0-SNAPSHOT"
-RIC_SIM_IMAGE_TAG_REMOTE="2.2.0"
-RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.2.0"
+RIC_SIM_IMAGE_TAG_REMOTE_SNAPSHOT="2.3.0-SNAPSHOT"
+RIC_SIM_IMAGE_TAG_REMOTE="2.3.0"
+RIC_SIM_IMAGE_TAG_REMOTE_RELEASE="2.3.0"
# DMAAP Mediator Service
DMAAP_MED_IMAGE_BASE="o-ran-sc/nonrtric-dmaap-mediator-producer"
diff --git a/test/common/testcase_common.sh b/test/common/testcase_common.sh
index a94d3e2..66e6dfa 100755
--- a/test/common/testcase_common.sh
+++ b/test/common/testcase_common.sh
@@ -29,7 +29,7 @@
echo " [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address>]"
echo " [--repo-policy local|remote] [--cluster-timeout <timeout-in seconds>] [--print-stats]"
echo " [--override <override-environment-filename>] [--pre-clean] [--gen-stats] [--delete-namespaces]"
- echo " [--delete-containers] [--endpoint-stats] [--kubeconfig <config-file>]"
+ echo " [--delete-containers] [--endpoint-stats] [--kubeconfig <config-file>] [--host-path-dir <local-host-dir>]"
}
if [ $# -eq 1 ] && [ "$1" == "help" ]; then
@@ -65,6 +65,7 @@
echo "--delete-containers - Delete docker containers before starting tests - but only those created by the test scripts. Docker mode only."
echo "--endpoint-stats - Collect endpoint statistics"
echo "--kubeconfig - Configure kubectl to use cluster specific cluster config file"
+ echo "--host-path-dir - (Base-)path on local-hostmounted to all VMs (nodes), for hostpath volumes in kube"
echo ""
echo "List of app short names supported: "$APP_SHORT_NAMES
exit 0
@@ -270,6 +271,14 @@
#Var to configure kubectl from a config file.
KUBECONF=""
+#Var pointing to dir mounted to each kubernetes node (master and workers)
+#Persistent volumes using "hostpath" are allocated beneath the point.
+#Typically it is a dir on local host mounted to each VM running the master and worker.
+#So the intention is make this dir available so the PODs can be restarted on any
+#node and still access the persistent data
+#If not set from cmd line, the path is defaults to "/tmp"
+HOST_PATH_BASE_DIR=""
+
#File to keep deviation messages
DEVIATION_FILE=".tmp_deviations"
rm $DEVIATION_FILE &> /dev/null
@@ -837,6 +846,21 @@
fi
fi
fi
+ if [ $paramerror -eq 0 ]; then
+ if [ "$1" == "--host-path-dir" ]; then
+ shift;
+ if [ -z "$1" ]; then
+ paramerror=1
+ if [ -z "$paramerror_str" ]; then
+ paramerror_str="No path found for : '--host-path-dir'"
+ fi
+ else
+ HOST_PATH_BASE_DIR=$1
+ shift
+ foundparm=0
+ fi
+ fi
+ fi
done
echo ""
@@ -1020,7 +1044,7 @@
else
if [ $RUNMODE == "KUBE" ]; then
echo " kubectl is installed and using versions:"
- echo $(kubectl version --short=true) | indent2
+ echo $(kubectl $KUBECONF version --short=true) | indent2
res=$(kubectl $KUBECONF cluster-info 2>&1)
if [ $? -ne 0 ]; then
echo -e "$BOLD$RED############################################# $ERED$EBOLD"
@@ -1052,6 +1076,16 @@
fi
echo " Node(s) and container runtime config"
kubectl $KUBECONF get nodes -o wide | indent2
+ echo ""
+ if [ -z "$HOST_PATH_BASE_DIR" ]; then
+ HOST_PATH_BASE_DIR="/tmp"
+ echo " Persistent volumes will be mounted to $HOST_PATH_BASE_DIR on applicable node"
+ echo " No guarantee that persistent volume data is available on all nodes in the cluster"
+ else
+ echo "Persistent volumes will be mounted to base dir: $HOST_PATH_BASE_DIR"
+ echo "Assuming this dir is mounted from each node to a dir on the localhost or other"
+ echo "file system available to all nodes"
+ fi
fi
fi
diff --git a/test/cr/app/nginx.conf b/test/cr/app/nginx.conf
index 32beca1..e05fbde 100644
--- a/test/cr/app/nginx.conf
+++ b/test/cr/app/nginx.conf
@@ -5,7 +5,6 @@
events {
worker_connections 768;
- # multi_accept on;
}
http {
@@ -19,10 +18,6 @@
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
- # server_tokens off;
-
- # server_names_hash_bucket_size 64;
- # server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
@@ -62,45 +57,4 @@
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
- ##
- # Gzip Settings
- ##
-
- gzip on;
-
- # gzip_vary on;
- # gzip_proxied any;
- # gzip_comp_level 6;
- # gzip_buffers 16 8k;
- # gzip_http_version 1.1;
- # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-
- ##
- # Virtual Host Configs
- ##
-
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
}
-
-
-#mail {
-# # See sample authentication script at:
-# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
-#
-# # auth_http localhost/auth.php;
-# # pop3_capabilities "TOP" "USER";
-# # imap_capabilities "IMAP4rev1" "UIDPLUS";
-#
-# server {
-# listen localhost:110;
-# protocol pop3;
-# proxy on;
-# }
-#
-# server {
-# listen localhost:143;
-# protocol imap;
-# proxy on;
-# }
-#}
diff --git a/test/cr/app/requirements.txt b/test/cr/app/requirements.txt
index 1dabaa8..d1785cb 100644
--- a/test/cr/app/requirements.txt
+++ b/test/cr/app/requirements.txt
@@ -1,3 +1,3 @@
-Flask==1.1.1
+Flask==2.0.1
diff --git a/test/cr/basic_test.sh b/test/cr/basic_test.sh
index ea0a576..f346f7a 100755
--- a/test/cr/basic_test.sh
+++ b/test/cr/basic_test.sh
@@ -98,7 +98,7 @@
do_curl GET /counter/received_callbacks 200
echo "=== Get counter - callback batches ==="
-RESULT="2"
+RESULT="0"
do_curl GET /counter/received_callback_batches 200
echo "=== Get counter - fetched events ==="
@@ -115,7 +115,7 @@
do_curl GET /counter/received_callbacks?id=test 200
echo "=== Get counter - callback batches ==="
-RESULT="2"
+RESULT="1"
do_curl GET /counter/received_callback_batches?id=test 200
echo "=== Get counter - fetched events ==="
@@ -161,7 +161,7 @@
do_curl GET /counter/received_callbacks 200
echo "=== Get counter - callback batches ==="
-RESULT="2"
+RESULT="0"
do_curl GET /counter/received_callback_batches 200
echo "=== Get counter - fetched events ==="
@@ -178,7 +178,7 @@
do_curl GET /counter/received_callbacks?id=test 200
echo "=== Get counter - callback batches ==="
-RESULT="2"
+RESULT="1"
do_curl GET /counter/received_callback_batches?id=test 200
echo "=== Get counter - fetched events ==="
@@ -212,7 +212,7 @@
do_curl GET /counter/received_callbacks 200
echo "=== Get counter - callback batches ==="
-RESULT="5"
+RESULT="0"
do_curl GET /counter/received_callback_batches 200
echo "=== Get counter - fetched events ==="
@@ -229,7 +229,7 @@
do_curl GET /counter/received_callbacks?id=test1 200
echo "=== Get counter - callback batches ==="
-RESULT="1"
+RESULT="0"
do_curl GET /counter/received_callback_batches?id=test1 200
echo "=== Get counter - fetched events ==="
@@ -249,7 +249,7 @@
do_curl GET /counter/received_callbacks 200
echo "=== Get counter - callback batches ==="
-RESULT="5"
+RESULT="0"
do_curl GET /counter/received_callback_batches 200
echo "=== Get counter - fetched events ==="
@@ -271,7 +271,7 @@
do_curl GET /counter/received_callbacks 200
echo "=== Get counter - callback batches ==="
-RESULT="6"
+RESULT="1"
do_curl GET /counter/received_callback_batches 200
echo "=== Get counter - fetched events ==="
diff --git a/test/mrstub/app/main.py b/test/mrstub/app/main.py
index dd80f3f..7536435 100644
--- a/test/mrstub/app/main.py
+++ b/test/mrstub/app/main.py
@@ -582,7 +582,7 @@
uploader_thread=Thread(target=dmaap_uploader)
uploader_thread.start()
-if os.environ['GENERIC_TOPICS_UPLOAD_BASEURL'] is not None:
+if 'GENERIC_TOPICS_UPLOAD_BASEURL' in os.environ:
print("GENERIC_TOPICS_UPLOAD_BASEURL:"+os.environ['GENERIC_TOPICS_UPLOAD_BASEURL'])
generic_topics_upload_baseurl=os.environ['GENERIC_TOPICS_UPLOAD_BASEURL']
if generic_topics_upload_baseurl and generic_uploader_thread is None:
diff --git a/test/mrstub/app/nginx.conf b/test/mrstub/app/nginx.conf
index 35b5ba0..1aa1ee2 100644
--- a/test/mrstub/app/nginx.conf
+++ b/test/mrstub/app/nginx.conf
@@ -5,7 +5,6 @@
events {
worker_connections 768;
- # multi_accept on;
}
http {
@@ -19,10 +18,6 @@
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
- # server_tokens off;
-
- # server_names_hash_bucket_size 64;
- # server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
@@ -56,46 +51,4 @@
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
-
- ##
- # Gzip Settings
- ##
-
- gzip on;
-
- # gzip_vary on;
- # gzip_proxied any;
- # gzip_comp_level 6;
- # gzip_buffers 16 8k;
- # gzip_http_version 1.1;
- # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-
- ##
- # Virtual Host Configs
- ##
-
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
}
-
-
-#mail {
-# # See sample authentication script at:
-# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
-#
-# # auth_http localhost/auth.php;
-# # pop3_capabilities "TOP" "USER";
-# # imap_capabilities "IMAP4rev1" "UIDPLUS";
-#
-# server {
-# listen localhost:110;
-# protocol pop3;
-# proxy on;
-# }
-#
-# server {
-# listen localhost:143;
-# protocol imap;
-# proxy on;
-# }
-#}
\ No newline at end of file
diff --git a/test/mrstub/app/requirements.txt b/test/mrstub/app/requirements.txt
index 8c3d61f..677efba 100644
--- a/test/mrstub/app/requirements.txt
+++ b/test/mrstub/app/requirements.txt
@@ -1,3 +1,3 @@
pip==20.1
-Flask==1.1.2
+Flask==2.0.1
requests==2.25.1
\ No newline at end of file
diff --git a/test/mrstub/basic_test.sh b/test/mrstub/basic_test.sh
index 582c36f..6e854ea 100755
--- a/test/mrstub/basic_test.sh
+++ b/test/mrstub/basic_test.sh
@@ -44,6 +44,8 @@
# source function to do curl and check result
. ../common/do_curl_function.sh
+RESP_CONTENT='*' #Dont check resp content type
+
echo "=== Stub hello world ==="
RESULT="OK"
do_curl GET / 200
@@ -172,7 +174,7 @@
do_curl POST /events/generic-path 200 .tmp.json
echo "=== Fetch a request ==="
-RESULT="json:[{\"correlationId\": \""$CORRID"\", \"message\": {\"test\":\"testresponse\"}, \"status\": \"200\"}]"
+RESULT="json:[\"{\\\"correlationId\\\": \\\""$CORRID"\\\", \\\"message\\\": {\\\"test\\\": \\\"testresponse\\\"}, \\\"status\\\": \\\"200\\\"}\"]"
do_curl GET '/events/generic-path' 200
echo "********************"
diff --git a/test/prodstub/app/nginx.conf b/test/prodstub/app/nginx.conf
index 8119b0d..567f60d 100644
--- a/test/prodstub/app/nginx.conf
+++ b/test/prodstub/app/nginx.conf
@@ -5,7 +5,6 @@
events {
worker_connections 768;
- # multi_accept on;
}
http {
@@ -19,10 +18,6 @@
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
- # server_tokens off;
-
- # server_names_hash_bucket_size 64;
- # server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
@@ -55,46 +50,5 @@
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
-
- ##
- # Gzip Settings
- ##
-
- gzip on;
-
- # gzip_vary on;
- # gzip_proxied any;
- # gzip_comp_level 6;
- # gzip_buffers 16 8k;
- # gzip_http_version 1.1;
- # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-
- ##
- # Virtual Host Configs
- ##
-
- include /etc/nginx/conf.d/*.conf;
- include /etc/nginx/sites-enabled/*;
}
-
-#mail {
-# # See sample authentication script at:
-# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
-#
-# # auth_http localhost/auth.php;
-# # pop3_capabilities "TOP" "USER";
-# # imap_capabilities "IMAP4rev1" "UIDPLUS";
-#
-# server {
-# listen localhost:110;
-# protocol pop3;
-# proxy on;
-# }
-#
-# server {
-# listen localhost:143;
-# protocol imap;
-# proxy on;
-# }
-#}
diff --git a/test/prodstub/app/requirements.txt b/test/prodstub/app/requirements.txt
index d33cdac..ed6e2d4 100644
--- a/test/prodstub/app/requirements.txt
+++ b/test/prodstub/app/requirements.txt
@@ -1,3 +1,3 @@
-Flask==1.1.1
+Flask==2.0.1
jsonschema==3.2.0
requests==2.24.0
diff --git a/test/prodstub/basic_test.sh b/test/prodstub/basic_test.sh
index 18b7735..33d7ae4 100755
--- a/test/prodstub/basic_test.sh
+++ b/test/prodstub/basic_test.sh
@@ -42,6 +42,7 @@
# source function to do curl and check result
. ../common/do_curl_function.sh
+RESP_CONTENT="*"
echo "=== hello world ==="
RESULT="OK"
diff --git a/test/simulator-group/dmaapmr/app.yaml b/test/simulator-group/dmaapmr/app.yaml
index 1a9d40a..434e757 100644
--- a/test/simulator-group/dmaapmr/app.yaml
+++ b/test/simulator-group/dmaapmr/app.yaml
@@ -113,6 +113,10 @@
- mountPath: /etc/kafka/secrets/jaas/zk_client_jaas.conf
subPath: zk_client_jaas.conf
name: dmaapmr-zk-client-jaas
+ initContainers:
+ - name: init-kafka
+ image: busybox
+ command: ['sh', '-c', 'until nslookup $MR_ZOOKEEPER_APP_NAME; do echo waiting for $MR_ZOOKEEPER_APP_NAME; sleep 2; done;']
volumes:
- configMap:
defaultMode: 420
@@ -160,6 +164,10 @@
- mountPath: /appl/dmaapMR1/etc/cadi.properties
subPath: cadi.properties
name: dmaapmr-cadi
+ initContainers:
+ - name: init-dmaap-mr
+ image: busybox
+ command: ['sh', '-c', 'until nslookup $MR_KAFKA_APP_NAME; do echo waiting for $MR_KAFKA_APP_NAME; sleep 2; done;']
volumes:
- configMap:
defaultMode: 420
diff --git a/test/simulator-group/ics/app.yaml b/test/simulator-group/ics/app.yaml
index ceb74c7..494db03 100644
--- a/test/simulator-group/ics/app.yaml
+++ b/test/simulator-group/ics/app.yaml
@@ -17,6 +17,9 @@
run: $ICS_APP_NAME
autotest: ICS
spec:
+ securityContext:
+ runAsUser: 0
+# Need to run as root to be able to store files in dir mounted as a hostPath volume
containers:
- name: $ICS_APP_NAME
image: $ICS_IMAGE
diff --git a/test/simulator-group/ics/mnt/.gitignore b/test/simulator-group/ics/mnt/.gitignore
new file mode 100644
index 0000000..b94353c
--- /dev/null
+++ b/test/simulator-group/ics/mnt/.gitignore
@@ -0,0 +1,17 @@
+################################################################################
+# Copyright (c) 2021 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+*
+!.gitignore
\ No newline at end of file
diff --git a/test/simulator-group/ics/pv.yaml b/test/simulator-group/ics/pv.yaml
index 3e9e285..c98fca8 100644
--- a/test/simulator-group/ics/pv.yaml
+++ b/test/simulator-group/ics/pv.yaml
@@ -2,6 +2,8 @@
kind: PersistentVolume
metadata:
name: $ICS_DATA_PV_NAME
+ annotations:
+ pv.beta.kubernetes.io/gid: "999"
labels:
run: $ICS_APP_NAME
autotest: ICS
@@ -13,4 +15,4 @@
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
hostPath:
- path: "/tmp/$ICS_PV_PATH"
+ path: "$HOST_PATH_BASE_DIR/$ICS_PV_PATH"
diff --git a/test/simulator-group/policy_agent/pv.yaml b/test/simulator-group/policy_agent/pv.yaml
index 332b341..eeed4a0 100644
--- a/test/simulator-group/policy_agent/pv.yaml
+++ b/test/simulator-group/policy_agent/pv.yaml
@@ -15,4 +15,4 @@
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
hostPath:
- path: "/tmp/$POLICY_AGENT_PV_PATH"
+ path: "$HOST_PATH_BASE_DIR/$POLICY_AGENT_PV_PATH"