From 61dcf37ef32500889688a107a36f462fac6bfe5d Mon Sep 17 00:00:00 2001 From: Milan Lysonek Date: Tue, 16 Mar 2021 12:21:43 +0100 Subject: [PATCH] Add postfix_network_listening_disabled test scenarios --- .../tests/correct.pass.sh | 2 ++ .../tests/correct_commented.fail.sh | 3 ++- .../postfix_network_listening_disabled/tests/wrong.fail.sh | 4 +++- .../tests/wrong_and_correct.fail.sh | 6 ++++++ .../tests/wrong_but_disabled.pass.sh | 6 ++++++ 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_and_correct.fail.sh create mode 100644 linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_but_disabled.pass.sh diff --git a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct.pass.sh b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct.pass.sh index 2c263e4dadf..28fb54b2f07 100644 --- a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct.pass.sh +++ b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct.pass.sh @@ -2,3 +2,5 @@ # packages = postfix echo "inet_interfaces = loopback-only" > /etc/postfix/main.cf +systemctl enable postfix +systemctl start postfix diff --git a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct_commented.fail.sh b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct_commented.fail.sh index 92472f26ba7..7e7eab9e818 100644 --- a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct_commented.fail.sh +++ b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/correct_commented.fail.sh @@ -2,4 +2,5 @@ # packages = postfix echo "#inet_interfaces = loopback-only" > /etc/postfix/main.cf -echo "inet_interfaces = something_different" >> /etc/postfix/main.cf +systemctl enable postfix +systemctl start postfix diff --git a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong.fail.sh b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong.fail.sh index f8ce16ba9bb..cd1f2cae59a 100644 --- a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong.fail.sh +++ b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong.fail.sh @@ -1,4 +1,6 @@ #!/bin/bash # packages = postfix -echo "inet_interfaces = some_different_interface,loopback-only" > /etc/postfix/main.cf +echo "inet_interfaces = all" > /etc/postfix/main.cf +systemctl enable postfix +systemctl start postfix diff --git a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_and_correct.fail.sh b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_and_correct.fail.sh new file mode 100644 index 00000000000..b0b70890989 --- /dev/null +++ b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_and_correct.fail.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# packages = postfix + +systemctl enable postfix +systemctl start postfix +echo "inet_interfaces = all,loopback-only" > /etc/postfix/main.cf diff --git a/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_but_disabled.pass.sh b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_but_disabled.pass.sh new file mode 100644 index 00000000000..5fb37d11601 --- /dev/null +++ b/linux_os/guide/services/mail/postfix_client/postfix_network_listening_disabled/tests/wrong_but_disabled.pass.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# packages = postfix + +echo "inet_interfaces = all" > /etc/postfix/main.cf +systemctl stop postfix +systemctl disable postfix