diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-13 15:13:22 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-05-13 15:52:55 +0200 |
commit | 9f8f85fac8f1681d3367b96734b9595584955570 (patch) | |
tree | 27f3c9b9e2546f7e3a18b792d78f6e5d147bac24 /tests | |
parent | a85c1858548b8686d8dcba44b1f4f9ff82e1d234 (diff) | |
download | alpine-conf-9f8f85fac8f1681d3367b96734b9595584955570.zip |
tests: add test for setup-mta
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/setup_mta_test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/setup_mta_test b/tests/setup_mta_test new file mode 100755 index 0000000..726713c --- /dev/null +++ b/tests/setup_mta_test @@ -0,0 +1,20 @@ +#!/usr/bin/env atf-sh + +. $(atf_get_srcdir)/test_env.sh +init_tests \ + setup_mta_usage \ + setup_mta + +setup_mta_usage_body() { + test_usage setup-mta +} + +setup_mta_body() { + init_env + atf_check -s exit:0 \ + -o match:"apk add ssmtp" \ + -e empty \ + setup-mta smtp.example.com + grep -q 'mailhub=smtp.example.com' etc/ssmtp/ssmtp.conf || atf_fail "smtp.example.com not set in etc/ssmtp/ssmtp.conf" +} + |