From 1dd18ea39de4184a65527ee0255802f3a6fe3953 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 23 Jun 2020 18:51:56 +0200 Subject: ssh: extend tests --- scripts/cli/test_service_ssh.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'scripts') diff --git a/scripts/cli/test_service_ssh.py b/scripts/cli/test_service_ssh.py index f9f0de3db..9127d77ba 100755 --- a/scripts/cli/test_service_ssh.py +++ b/scripts/cli/test_service_ssh.py @@ -46,6 +46,9 @@ class TestServiceSSH(unittest.TestCase): self.session.set(base_path + ['port', '2222']) self.session.set(base_path + ['disable-host-validation']) self.session.set(base_path + ['disable-password-authentication']) + self.session.set(base_path + ['loglevel', 'VERBOSE']) + self.session.set(base_path + ['listen-address', '127.0.0.1']) + self.session.set(base_path + ['client-keepalive-interval', '100']) # commit changes self.session.commit() @@ -62,6 +65,18 @@ class TestServiceSSH(unittest.TestCase): pwd = get_config_value('PasswordAuthentication') self.assertTrue("no" in pwd) + # Check loglevel + loglevel = get_config_value('LogLevel') + self.assertTrue("VERBOSE" in loglevel) + + # Check listen address + address = get_config_value('ListenAddress') + self.assertTrue("127.0.0.1" in address) + + # Check keepalive + keepalive = get_config_value('ClientAliveInterval') + self.assertTrue("100" in keepalive) + # Check for running process self.assertTrue("sshd" in (p.name() for p in process_iter())) -- cgit v1.2.3