summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-08-22 18:09:32 +0200
committerGitHub <noreply@github.com>2024-08-22 18:09:32 +0200
commit322dc0f0ba4fce664d089871bc7833d30f55718c (patch)
tree389dace55a31793acb7598c68b9c8acb2e2bdc36 /smoketest
parent2277371fe18577502ce318c23789f86d1ec97be7 (diff)
parentf453b33a6056de8fc5145ca9e680361fbce68348 (diff)
downloadvyos-1x-322dc0f0ba4fce664d089871bc7833d30f55718c.tar.gz
vyos-1x-322dc0f0ba4fce664d089871bc7833d30f55718c.zip
Merge pull request #4000 from sever-sever/T6672
T6672: Fix system option ssh-client source-interface
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_system_option.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_system_option.py b/smoketest/scripts/cli/test_system_option.py
index c6f48bfc6..ffb1d76ae 100755
--- a/smoketest/scripts/cli/test_system_option.py
+++ b/smoketest/scripts/cli/test_system_option.py
@@ -80,5 +80,20 @@ 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)