Skip to content

Commit 1e058c8

Browse files
author
Julien Neuhart
committed
fixing (again) cron tests
1 parent d270b92 commit 1e058c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build-and-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ RESULT=`docker run --rm -v $(pwd)/user1999:$CONTAINER_CWD thecodingmachine/nodej
1919
sudo rm -rf user1999
2020

2121
# Let's check that the crons are actually sending logs in the right place
22-
RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&1 echo "foobar")" thecodingmachine/nodejs:${VARIANT} -f Dockerfile.${VARIANT} sleep 1 2>&1 | grep -oP 'msg=foobar' | head -n1`
22+
RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&1 echo "foobar")" thecodingmachine/nodejs:${BRANCH}-${VARIANT} -f Dockerfile.${VARIANT} sleep 1 2>&1 | grep -oP 'msg=foobar' | head -n1`
2323
[[ "$RESULT" = "msg=foobar" ]]
2424

25-
RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&2 echo "error")" thecodingmachine/nodejs:${VARIANT} -f Dockerfile.${VARIANT} sleep 1 2>&1 | grep -oP 'msg=error' | head -n1`
25+
RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&2 echo "error")" thecodingmachine/nodejs:${BRANCH}-${VARIANT} -f Dockerfile.${VARIANT} sleep 1 2>&1 | grep -oP 'msg=error' | head -n1`
2626
[[ "$RESULT" = "msg=error" ]]
2727

2828
# Let's check that the cron with a user different from root is actually run.
29-
RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami" -e CRON_USER_1="docker" thecodingmachine/nodejs:${VARIANT} -f Dockerfile.${VARIANT} sleep 1 2>&1 | grep -oP 'msg=docker' | head -n1`
29+
RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami" -e CRON_USER_1="docker" thecodingmachine/nodejs:${BRANCH}-${VARIANT} -f Dockerfile.${VARIANT} sleep 1 2>&1 | grep -oP 'msg=docker' | head -n1`
3030
[[ "$RESULT" = "msg=docker" ]]
3131

3232
echo "Tests passed with success"

0 commit comments

Comments
 (0)