mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
fixed delalias, added additional tests (Closes: #909)
This commit is contained in:
parent
2167108ec0
commit
f682dfc15d
2 changed files with 21 additions and 9 deletions
|
@ -1243,12 +1243,27 @@ load 'test_helper/bats-assert/load'
|
|||
run /bin/sh -c 'cat ./config/postfix-virtual.cf | grep "test1@example.org test1@forward.com,test2@forward.com" | wc -l | grep 1'
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "checking setup.sh: setup.sh alias del" {
|
||||
echo 'test1@example.org test1@forward.com, test2@forward.com,' > ./config/postfix-virtual.cf
|
||||
echo -e 'test1@example.org test1@forward.com,test2@forward.com\ntest2@example.org test1@forward.com' > ./config/postfix-virtual.cf
|
||||
|
||||
./setup.sh -c mail alias del test1@example.org test1@forward.com
|
||||
run grep "test1@forward.com" ./config/postfix-virtual.cf
|
||||
assert_output --regexp "^test2@example.org +test1@forward.com$"
|
||||
|
||||
run grep "test2@forward.com" ./config/postfix-virtual.cf
|
||||
assert_output --regexp "^test1@example.org +test2@forward.com$"
|
||||
|
||||
./setup.sh -c mail alias del test1@example.org test2@forward.com
|
||||
run cat ./config/postfix-virtual.cf | wc -l | grep 0
|
||||
run grep "test1@example.org" ./config/postfix-virtual.cf
|
||||
assert_failure
|
||||
|
||||
run grep "test2@example.org" ./config/postfix-virtual.cf
|
||||
assert_success
|
||||
|
||||
./setup.sh -c mail alias del test2@example.org test1@forward.com
|
||||
run grep "test2@example.org" ./config/postfix-virtual.cf
|
||||
assert_failure
|
||||
}
|
||||
|
||||
# config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue