summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-23 18:51:56 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-23 18:51:56 +0200
commit1dd18ea39de4184a65527ee0255802f3a6fe3953 (patch)
tree119b6d143a5389dc02b6da5a57b9e1e17b33d8b4
parent3d329a77b30b48f51fd104c302c2f2dce0eb4cb2 (diff)
downloadvyos-1x-1dd18ea39de4184a65527ee0255802f3a6fe3953.tar.gz
vyos-1x-1dd18ea39de4184a65527ee0255802f3a6fe3953.zip
ssh: extend tests
-rwxr-xr-xscripts/cli/test_service_ssh.py15
1 files changed, 15 insertions, 0 deletions
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()))