[CSIT] fix /operations/GENERIC-RESOURCE-API path for RFC8040 conformance
[sdnc/oam.git] / csit / run-csit.sh
index 04d744b..ba3fb9a 100755 (executable)
@@ -157,10 +157,8 @@ source_safely "${WORKSPACE}/sdnc-csit.env"
 if [[ -z $ROBOT_IMAGE ]]; then
   # Run installation of prerequired libraries
   source_safely "${WORKSPACE}/prepare-csit.sh"
-
-
-# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh
-source_safely "${ROBOT_VENV}/bin/activate"
+  # Activate the virtualenv containing all the required libraries installed by prepare-csit.sh
+  source_safely "${ROBOT_VENV}/bin/activate"
 fi
 
 WORKDIR=$(mktemp -d --suffix=-robot-workdir)
@@ -210,7 +208,8 @@ if [[ -z $SDNC_RELEASE_WITHOUT_ROBOT ]] ; then
             python -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
         else
             echo "*** TRACE **** python is running in a container"
-            docker run --net="host" \
+            docker run --rm --net="host" \
+            --env-file ${WORKSPACE}/sdnc-csit-robot.env \
             -v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE  \
             python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
         fi
@@ -222,7 +221,7 @@ if [[ -z $SDNC_RELEASE_WITHOUT_ROBOT ]] ; then
 else
     echo "[WARNING] SDNC_RELEASE_WITHOUT_ROBOT is TRUE "
     echo "[WARNING] Dummy Robot test suite is executed, job remains ok. "
-    docker run --net="host" \
+    docker run --rm --net="host" \
     -v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE  \
     python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${WORKSPACE}/tests/sdnr/debug/10_dummy.robot
    true