summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/test_system_option.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-08-24 10:05:37 +0200
committerGitHub <noreply@github.com>2024-08-24 10:05:37 +0200
commitaaeb7e3431cc7ddc8a0fbaf9c846d686b0fc7203 (patch)
tree9a05755e8d6967e883224c14e7ae4b09d067d2c1 /smoketest/scripts/cli/test_system_option.py
parent2506569c9cec28507cbc4c44c053458bc85d7f32 (diff)
parent2947e7f2a5a48af5cb85e440fe5ef83c0e0b498a (diff)
downloadvyos-1x-aaeb7e3431cc7ddc8a0fbaf9c846d686b0fc7203.tar.gz
vyos-1x-aaeb7e3431cc7ddc8a0fbaf9c846d686b0fc7203.zip
Merge pull request #4004 from vyos/mergify/bp/sagitta/pr-4000
T6672: Fix system option ssh-client source-interface (backport #4000)
Diffstat (limited to 'smoketest/scripts/cli/test_system_option.py')
-rwxr-xr-xsmoketest/scripts/cli/test_system_option.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/smoketest/scripts/cli/test_system_option.py b/smoketest/scripts/cli/test_system_option.py
index c6f48bfc6..5e2827724 100755
--- a/smoketest/scripts/cli/test_system_option.py
+++ b/smoketest/scripts/cli/test_system_option.py
@@ -80,5 +80,19 @@ class TestSystemOption(VyOSUnitTestSHIM.TestCase):
self.assertEqual(sysctl_read('net.ipv4.neigh.default.gc_thresh2'), gc_thresh2)
self.assertEqual(sysctl_read('net.ipv4.neigh.default.gc_thresh3'), gc_thresh3)
+ def test_ssh_client_options(self):
+ loopback = 'lo'
+ ssh_client_opt_file = '/etc/ssh/ssh_config.d/91-vyos-ssh-client-options.conf'
+
+ self.cli_set(['system', 'option', 'ssh-client', 'source-interface', loopback])
+ self.cli_commit()
+
+ tmp = read_file(ssh_client_opt_file)
+ self.assertEqual(tmp, f'BindInterface {loopback}')
+
+ self.cli_delete(['system', 'option'])
+ self.cli_commit()
+ self.assertFalse(os.path.exists(ssh_client_opt_file))
+
if __name__ == '__main__':
- unittest.main(verbosity=2, failfast=True)
+ unittest.main(verbosity=2)