From 13686def7e7370ff910abce20b744f5ded932718 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 17 Feb 2020 21:21:12 +0100 Subject: ssh: add test for disable-password-authentication --- scripts/cli/test_service_ssh.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/cli/test_service_ssh.py') diff --git a/scripts/cli/test_service_ssh.py b/scripts/cli/test_service_ssh.py index 40e1433b2..e882b8f0a 100755 --- a/scripts/cli/test_service_ssh.py +++ b/scripts/cli/test_service_ssh.py @@ -49,6 +49,7 @@ class TestServiceSSH(unittest.TestCase): """ Check if SSH service can be configured and runs """ self.session.set(base_path + ['port', '2222']) self.session.set(base_path + ['disable-host-validation']) + self.session.set(base_path + ['disable-password-authentication']) # commit changes self.session.commit() @@ -61,6 +62,10 @@ class TestServiceSSH(unittest.TestCase): dns = get_config_value('UseDNS') self.assertTrue("no" in dns) + # Check PasswordAuthentication + pwd = get_config_value('PasswordAuthentication') + self.assertTrue("no" in pwd) + # Check for running process self.assertTrue("sshd" in (p.name() for p in process_iter())) -- cgit v1.2.3