diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-06-23 18:51:56 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-06-23 18:51:56 +0200 |
commit | 1dd18ea39de4184a65527ee0255802f3a6fe3953 (patch) | |
tree | 119b6d143a5389dc02b6da5a57b9e1e17b33d8b4 /scripts/cli/test_service_ssh.py | |
parent | 3d329a77b30b48f51fd104c302c2f2dce0eb4cb2 (diff) | |
download | vyos-1x-1dd18ea39de4184a65527ee0255802f3a6fe3953.tar.gz vyos-1x-1dd18ea39de4184a65527ee0255802f3a6fe3953.zip |
ssh: extend tests
Diffstat (limited to 'scripts/cli/test_service_ssh.py')
-rwxr-xr-x | scripts/cli/test_service_ssh.py | 15 |
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())) |