mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-10 01:15:00 +02:00
Added integration testing - #28
This commit is contained in:
parent
d8a4f3b033
commit
9bcced6f29
8 changed files with 63 additions and 3 deletions
19
test/test.sh
Executable file
19
test/test.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Set up test framework
|
||||
# wget -q https://raw.github.com/lehmannro/assert.sh/master/assert.sh
|
||||
source assert.sh
|
||||
|
||||
# Testing user creation
|
||||
assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1" "cur\nnew\ntmp"
|
||||
assert "docker exec mail ls /var/mail/otherdomain.tld/user2" "cur\nnew\ntmp"
|
||||
|
||||
# Testing that mail is received for existing user
|
||||
assert_raises "docker exec mail grep 'status=sent (delivered to maildir)' /var/log/mail.log" "false"
|
||||
assert "docker exec mail ls -A /var/mail/localhost.localdomain/user1/new | wc -l" " 1"
|
||||
|
||||
# Ending tests
|
||||
assert_end
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue