docker-postfix/unit-tests/postfix_custom_commands.bats
2020-10-24 21:24:18 +02:00

20 lines
541 B
Bash

#!/usr/bin/env bats
load /code/scripts/common.sh
load /code/scripts/common-run.sh
@test "Make sure that postfix_custom_commands adds lines" {
local POSTFIX_alias_database=hash:/etc/mail/aliases
postfix_custom_commands
cat /etc/postfix/main.cf | fgrep -qx "alias_database = hash:/etc/mail/aliases"
postfix check
}
@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"
postfix check
}