From 37540509dcd9f3b4c4955776537c77a5b7933cc1 Mon Sep 17 00:00:00 2001 From: Sebastian Kaiser Date: Fri, 8 Nov 2019 02:22:33 +0100 Subject: [PATCH] - test for user-patches.sh --- Makefile | 2 +- test/config/user-patches/user-patches.sh | 2 +- test/tests.bats | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a6d0bf7f..b4bf98ac 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ run: -v "`pwd`/test/config":/tmp/docker-mailserver \ -v "`pwd`/test/test-files":/tmp/docker-mailserver-test:ro \ -v "`pwd`/test/onedir":/var/mail-state \ - -v "`pwd`/test/config/user-patches/user-patches.sh":/tmp/docker-mailserver/user-patches.sh:ro \ + -v "`pwd`/test/config/user-patches/user-patches.sh":/tmp/docker-mailserver/user-patches.sh \ -e ENABLE_CLAMAV=1 \ -e SPOOF_PROTECTION=1 \ -e ENABLE_SPAMASSASSIN=1 \ diff --git a/test/config/user-patches/user-patches.sh b/test/config/user-patches/user-patches.sh index 4b8163d2..2a315070 100644 --- a/test/config/user-patches/user-patches.sh +++ b/test/config/user-patches/user-patches.sh @@ -3,4 +3,4 @@ # This user script will be executed between configuration and starting daemons # To enable it you must save it in your config directory as "user-patches.sh" ## -echo "Default user-patches.sh successfully executed!" \ No newline at end of file +echo "Default user-patches.sh successfully executed" \ No newline at end of file diff --git a/test/tests.bats b/test/tests.bats index 63a71608..bf3a0ddf 100644 --- a/test/tests.bats +++ b/test/tests.bats @@ -28,8 +28,8 @@ function count_processed_changes() { # @test "checking configuration: user-patches.sh executed" { - run docker logs mail | grep "Default user-patches.sh successfully executed!" - assert_success + run echo -n "`docker logs mail | grep 'user\-patches\.sh'`" + assert_output --partial "Default user-patches.sh successfully executed" } @test "checking configuration: hostname/domainname" {