mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-05 10:35:41 +02:00
Added tests and simplified some of them
This commit is contained in:
parent
1c3b86dc41
commit
97a495ae1d
3 changed files with 16 additions and 12 deletions
11
Makefile
11
Makefile
|
@ -1,7 +1,8 @@
|
|||
NAME = tvial/docker-mailserver
|
||||
VERSION = $(TRAVIS_BUILD_ID)
|
||||
|
||||
all: build run prepare fixtures tests
|
||||
all: build run fixtures tests clean
|
||||
all-no-build: run fixtures tests clean
|
||||
|
||||
build:
|
||||
docker build --no-cache -t $(NAME):$(VERSION) .
|
||||
|
@ -13,12 +14,7 @@ run:
|
|||
# Run containers
|
||||
docker run -d --name mail -v "`pwd`/postfix":/tmp/postfix -v "`pwd`/spamassassin":/tmp/spamassassin -v "`pwd`/test":/tmp/test -h mail.my-domain.com -t $(NAME):$(VERSION)
|
||||
docker run -d --name mail_pop3 -v "`pwd`/postfix":/tmp/postfix -v "`pwd`/spamassassin":/tmp/spamassassin -v "`pwd`/test":/tmp/test -e ENABLE_POP3=1 -h mail.my-domain.com -t $(NAME):$(VERSION)
|
||||
sleep 25
|
||||
|
||||
prepare:
|
||||
# Reinitialize logs
|
||||
docker exec mail /bin/sh -c 'echo "" > /var/log/mail.log'
|
||||
docker exec mail_pop3 /bin/sh -c 'echo "" > /var/log/mail.log'
|
||||
sleep 60
|
||||
|
||||
fixtures:
|
||||
# Sending test mails
|
||||
|
@ -38,3 +34,4 @@ tests:
|
|||
clean:
|
||||
# Get default files back
|
||||
git checkout postfix/accounts.cf postfix/virtual
|
||||
docker rm -f mail mail_pop3
|
Loading…
Add table
Add a link
Reference in a new issue