summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/setup_mta_test20
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"
+}
+