From b64dbabe1ccacba7154391118de481086f1dcc19 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 3 Jan 2022 18:43:12 +0100 Subject: test: vyos.validate: also test interface identifier in is_ipv6_link_local() --- src/tests/test_validate.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tests') diff --git a/src/tests/test_validate.py b/src/tests/test_validate.py index b43dbd97e..68a257d25 100644 --- a/src/tests/test_validate.py +++ b/src/tests/test_validate.py @@ -30,8 +30,12 @@ class TestVyOSValidate(TestCase): self.assertFalse(vyos.validate.is_ipv6_link_local('169.254.0.1')) self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::')) self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::affe:1')) + self.assertTrue(vyos.validate.is_ipv6_link_local('fe80::affe:1%eth0')) self.assertFalse(vyos.validate.is_ipv6_link_local('2001:db8::')) + self.assertFalse(vyos.validate.is_ipv6_link_local('2001:db8::%eth0')) self.assertFalse(vyos.validate.is_ipv6_link_local('VyOS')) + self.assertFalse(vyos.validate.is_ipv6_link_local('::1')) + self.assertFalse(vyos.validate.is_ipv6_link_local('::1%lo')) def test_is_ipv6_link_local(self): self.assertTrue(vyos.validate.is_loopback_addr('127.0.0.1')) -- cgit v1.2.3