Run test env towards selected kube cluster
[nonrtric.git] / test / common / dmaapadp_api_functions.sh
index 26da2d0..d7e8c0d 100644 (file)
@@ -79,7 +79,7 @@ __DMAAPADP_kube_delete_all() {
 # args: <log-dir> <file-prexix>
 __DMAAPADP_store_docker_logs() {
        if [ $RUNMODE == "KUBE" ]; then
-               kubectl  logs -l "autotest=DMAAPADP" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_dmaapadapter.log 2>&1
+               kubectl $KUBECONF  logs -l "autotest=DMAAPADP" -n $KUBE_NONRTRIC_NAMESPACE --tail=-1 > $1$2_dmaapadapter.log 2>&1
        else
                docker logs $DMAAP_ADP_APP_NAME > $1$2_dmaapadapter.log 2>&1
        fi
@@ -92,6 +92,24 @@ __DMAAPADP_initial_setup() {
        use_dmaapadp_http
 }
 
+# Set app short-name, app name and namespace for logging runtime statistics of kubernets pods or docker containers
+# For docker, the namespace shall be excluded
+# This function is called for apps managed by the test script as well as for prestarted apps.
+# args: -
+__DMAAPADP_statisics_setup() {
+       if [ $RUNMODE == "KUBE" ]; then
+               echo "DMAAPADP $DMAAP_ADP_APP_NAME $KUBE_NONRTRIC_NAMESPACE"
+       else
+               echo "DMAAPADP $DMAAP_ADP_APP_NAME"
+       fi
+}
+
+# Check application requirements, e.g. helm, the the test needs. Exit 1 if req not satisfied
+# args: -
+__DMAAPADP_test_requirements() {
+       :
+}
+
 #######################################################
 
 # Set http as the protocol to use for all communication to the Dmaap adapter
@@ -112,7 +130,7 @@ use_dmaapadp_https() {
 # args: <protocol> <internal-port> <external-port>
 __dmaapadp_set_protocoll() {
        echo -e $BOLD"$DMAAP_ADP_DISPLAY_NAME protocol setting"$EBOLD
-       echo -e " Using $BOLD http $EBOLD towards $DMAAP_ADP_DISPLAY_NAME"
+       echo -e " Using $BOLD $1 $EBOLD towards $DMAAP_ADP_DISPLAY_NAME"
 
        ## Access to Dmaap adapter
 
@@ -173,7 +191,7 @@ __dmaapadp_export_vars() {
 
 
        # paths to other components
-       export ECS_SERVICE_PATH
+       export ICS_SERVICE_PATH
        export DMAAP_ADP_SERVICE_PATH
        export MR_SERVICE_PATH