summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-02-15 22:54:58 +0100
committerChristian Breunig <christian@breunig.cc>2024-02-16 08:32:52 +0100
commitece0e768f36e52f8964823d891264d7c187204ec (patch)
treecbd7c0a54e048aef17b27ba728b38e9352a0f8b1 /smoketest
parent56654191613113764415d7eddadcbd8c97e126de (diff)
downloadvyos-1x-ece0e768f36e52f8964823d891264d7c187204ec.tar.gz
vyos-1x-ece0e768f36e52f8964823d891264d7c187204ec.zip
T6001: add option to disable next-hop-tracking resolve-via-default
* set system ip nht no-resolve-via-default * set system ipv6 nht no-resolve-via-default
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_system_ip.py15
-rwxr-xr-xsmoketest/scripts/cli/test_system_ipv6.py15
2 files changed, 28 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/test_system_ip.py b/smoketest/scripts/cli/test_system_ip.py
index 567416774..ac8b74236 100755
--- a/smoketest/scripts/cli/test_system_ip.py
+++ b/smoketest/scripts/cli/test_system_ip.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2020-2023 VyOS maintainers and contributors
+# Copyright (C) 2020-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -120,5 +120,18 @@ class TestSystemIP(VyOSUnitTestSHIM.TestCase):
# Commit again
self.cli_commit()
+ def test_system_ip_nht(self):
+ self.cli_set(base_path + ['nht', 'no-resolve-via-default'])
+ self.cli_commit()
+ # Verify CLI config applied to FRR
+ frrconfig = self.getFRRconfig('', end='', daemon='zebra')
+ self.assertIn(f'no ip nht resolve-via-default', frrconfig)
+
+ self.cli_delete(base_path + ['nht', 'no-resolve-via-default'])
+ self.cli_commit()
+ # Verify CLI config removed to FRR
+ frrconfig = self.getFRRconfig('', end='', daemon='zebra')
+ self.assertNotIn(f'no ip nht resolve-via-default', frrconfig)
+
if __name__ == '__main__':
unittest.main(verbosity=2)
diff --git a/smoketest/scripts/cli/test_system_ipv6.py b/smoketest/scripts/cli/test_system_ipv6.py
index 225c2d666..bc0f7aa8c 100755
--- a/smoketest/scripts/cli/test_system_ipv6.py
+++ b/smoketest/scripts/cli/test_system_ipv6.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2021-2023 VyOS maintainers and contributors
+# Copyright (C) 2021-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -131,5 +131,18 @@ class TestSystemIPv6(VyOSUnitTestSHIM.TestCase):
# Commit again
self.cli_commit()
+ def test_system_ipv6_nht(self):
+ self.cli_set(base_path + ['nht', 'no-resolve-via-default'])
+ self.cli_commit()
+ # Verify CLI config applied to FRR
+ frrconfig = self.getFRRconfig('', end='', daemon='zebra')
+ self.assertIn(f'no ipv6 nht resolve-via-default', frrconfig)
+
+ self.cli_delete(base_path + ['nht', 'no-resolve-via-default'])
+ self.cli_commit()
+ # Verify CLI config removed to FRR
+ frrconfig = self.getFRRconfig('', end='', daemon='zebra')
+ self.assertNotIn(f'no ipv6 nht resolve-via-default', frrconfig)
+
if __name__ == '__main__':
unittest.main(verbosity=2)