Skip to content

Commit

Permalink
(#75) fixed container startup when different user and command is used
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffle authored and svettwer committed Nov 9, 2020
1 parent 9eff4f7 commit 66e6832
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,13 @@ docker run \
-e SAKULI_LICENSE_KEY=${SAKULI_LICENSE_KEY} \
--shm-size=2G \
taconsol/sakuli:${1:-latest} \
"echo success!"

# start with different user and another command than sakuli
docker run \
--rm \
-e SAKULI_LICENSE_KEY=${SAKULI_LICENSE_KEY} \
--shm-size=2G \
-u 45678:12345 \
taconsol/sakuli:${1:-latest} \
"echo success!"
2 changes: 1 addition & 1 deletion src/common/scripts/execute_testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ else
pushd ${SAKULI_EXECUTION_DIR}
fi
# unknown option ==> call command
echo -e "\n\n------------------ EXECUTE COMMAND ------------------"
echo -e "\n\n------------------ EXECUTE SAKULI ------------------"
echo "Executing command: '$@'"
$@
SAKULI_RETURN_CODE=$?
Expand Down
9 changes: 8 additions & 1 deletion src/common/scripts/vnc_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,11 @@ if [[ $DEBUG == true ]]; then
tail ${TAIL_PARAMETERS} $STARTUPDIR/*.log $HOME/.vnc/*$DISPLAY.log
fi

$STARTUPDIR/execute_testsuite.sh "$@"
if [[ "${SAKULI_TEST_SUITE}" || "${GIT_URL}" ]]; then
echo "Executing Testsuite"
"$STARTUPDIR"/execute_testsuite.sh "$@"
else
echo -e "\n\n------------------ EXECUTE COMMAND ------------------"
echo "Executing command: '$@'"
$@
fi

0 comments on commit 66e6832

Please sign in to comment.