From 9f8f85fac8f1681d3367b96734b9595584955570 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 13 May 2022 15:13:22 +0200 Subject: tests: add test for setup-mta --- tests/setup_mta_test | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 tests/setup_mta_test (limited to 'tests') 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" +} + -- cgit v1.2.3