Skip to content

Commit

Permalink
Adding failing test for thecodingmachine#27
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Apr 30, 2018
1 parent e6a8c30 commit ce59097
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ fi
docker build --build-arg BRANCH="$BRANCH" --build-arg BRANCH_VARIANT="$BRANCH_VARIANT" tests/composer

# Let's check that the crons are actually sending logs in the right place
RESULT=`docker run -e CRON_SCHEDULE_1="@reboot" -e CRON_COMMAND_1="echo 'foobar'" thecodingmachine/php:${BRANCH}-${BRANCH_VARIANT} sleep 1`
RESULT=`docker run -e CRON_SCHEDULE_1="@reboot" -e CRON_COMMAND_1="(>&1 echo "foobar")" thecodingmachine/php:${BRANCH}-${BRANCH_VARIANT} sleep 1`
[[ "$RESULT" = "[Cron] foobar" ]]

RESULT=`docker run -e CRON_SCHEDULE_1="@reboot" -e CRON_COMMAND_1="(>&2 echo "error")" thecodingmachine/php:${BRANCH}-${BRANCH_VARIANT} sleep 1`
[[ "$RESULT" = "[Cron] error" ]]

echo "Tests passed with success"

0 comments on commit ce59097

Please sign in to comment.