2020-07-01 19:50:08 +08:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load /code/scripts/common.sh
|
|
|
|
load /code/scripts/common-run.sh
|
|
|
|
|
|
|
|
|
|
|
|
@test "Make sure that postfix_custom_commands adds lines" {
|
2021-02-08 06:07:39 +08:00
|
|
|
local POSTFIX_alias_database=lmdb:/etc/mail/aliases
|
2020-07-01 19:50:08 +08:00
|
|
|
postfix_custom_commands
|
2021-02-08 06:07:39 +08:00
|
|
|
cat /etc/postfix/main.cf | fgrep -qx "alias_database = lmdb:/etc/mail/aliases"
|
2020-10-23 19:20:31 +08:00
|
|
|
postfix check
|
2020-07-01 19:50:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "Make sure that postfix_custom_commands removes lines" {
|
|
|
|
local POSTFIX_readme_directory=
|
|
|
|
postfix_custom_commands
|
|
|
|
cat /etc/postfix/main.cf | egrep -q "^#readme_directory"
|
2020-10-23 19:20:31 +08:00
|
|
|
postfix check
|
2020-07-01 19:50:08 +08:00
|
|
|
}
|