diff options
Diffstat (limited to 'smoketest/scripts/cli/test_service_ssh.py')
| -rwxr-xr-x | smoketest/scripts/cli/test_service_ssh.py | 14 | 
1 files changed, 6 insertions, 8 deletions
diff --git a/smoketest/scripts/cli/test_service_ssh.py b/smoketest/scripts/cli/test_service_ssh.py index 0bb907c3a..eede042de 100755 --- a/smoketest/scripts/cli/test_service_ssh.py +++ b/smoketest/scripts/cli/test_service_ssh.py @@ -25,7 +25,7 @@ from vyos.util import process_named_running  from vyos.util import read_file  PROCESS_NAME = 'sshd' -SSHD_CONF = '/run/ssh/sshd_config' +SSHD_CONF = '/run/sshd/sshd_config'  base_path = ['service', 'ssh']  vrf = 'ssh-test' @@ -44,11 +44,6 @@ class TestServiceSSH(unittest.TestCase):      def tearDown(self):          # delete testing SSH config          self.session.delete(base_path) -        # restore "plain" SSH access -        self.session.set(base_path) -        # delete VRF -        self.session.delete(['vrf', 'name', vrf]) -          self.session.commit()          del self.session @@ -109,7 +104,7 @@ class TestServiceSSH(unittest.TestCase):      def test_ssh_multiple_listen_addresses(self):          # Check if SSH service can be configured and runs with multiple          # listen ports and listen-addresses -        ports = ['22', '2222'] +        ports = ['22', '2222', '2223', '2224']          for port in ports:              self.session.set(base_path + ['port', port]) @@ -143,7 +138,7 @@ class TestServiceSSH(unittest.TestCase):          with self.assertRaises(ConfigSessionError):              self.session.commit() -        self.session.set(['vrf', 'name', vrf, 'table', '1001']) +        self.session.set(['vrf', 'name', vrf, 'table', '1338'])          # commit changes          self.session.commit() @@ -159,5 +154,8 @@ class TestServiceSSH(unittest.TestCase):          tmp = cmd(f'ip vrf pids {vrf}')          self.assertIn(PROCESS_NAME, tmp) +        # delete VRF +        self.session.delete(['vrf', 'name', vrf]) +  if __name__ == '__main__':      unittest.main(verbosity=2)  | 
