diff --git a/roles/common/tests/test_parameters_mandatory.py b/roles/common/tests/test_parameters_mandatory.py index 7df43d6e57c536eb9b0e7a911cbb229d69cc66ac..ceae7c98c97fe6666f2232442d07d02ce5aad8ad 100644 --- a/roles/common/tests/test_parameters_mandatory.py +++ b/roles/common/tests/test_parameters_mandatory.py @@ -122,3 +122,24 @@ def test_backup_configuration_absent(File, Sudo): with Sudo(): assert not File('/etc/duply/main/patterns/common').exists + + +def test_ntp_software_not_installed(Package): + """ + Tests if NTP packages are absent. + """ + + # @TODO: This throws an exception. It seems version of Testinfra + # used cannot properly check for absence of package. + # assert not Package('ntp').is_installed + # assert not Package('ntpdate').is_installed + + pass + + +def test_ntp_listening_interfaces(Socket): + """ + Tests if NTP server is not listening. + """ + + assert not Socket('udp://:::123').is_listening