From 93e45419e821be0480240e8e4d60ad3c4f7b0091 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 21 Jul 2022 20:39:43 +0200 Subject: smoketest: fastnetmon: T4555: add IPv6 support --- smoketest/scripts/cli/test_service_ids.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/cli/test_service_ids.py b/smoketest/scripts/cli/test_service_ids.py index 7366bad2a..8720362ba 100755 --- a/smoketest/scripts/cli/test_service_ids.py +++ b/smoketest/scripts/cli/test_service_ids.py @@ -25,6 +25,7 @@ from vyos.util import read_file PROCESS_NAME = 'fastnetmon' FASTNETMON_CONF = '/run/fastnetmon/fastnetmon.conf' +NETWORKS_CONF = '/run/fastnetmon/networks_list' base_path = ['service', 'ids', 'ddos-protection'] class TestServiceIDS(VyOSUnitTestSHIM.TestCase): @@ -48,7 +49,7 @@ class TestServiceIDS(VyOSUnitTestSHIM.TestCase): self.assertFalse(process_named_running(PROCESS_NAME)) def test_fastnetmon(self): - networks = ['10.0.0.0/24', '10.5.5.0/24'] + networks = ['10.0.0.0/24', '10.5.5.0/24', '2001:db8:10::/64', '2001:db8:20::/64'] interfaces = ['eth0', 'eth1'] fps = '3500' mbps = '300' @@ -94,5 +95,10 @@ class TestServiceIDS(VyOSUnitTestSHIM.TestCase): tmp = ','.join(interfaces) self.assertIn(f'interfaces = {tmp}', config) + + network_config = read_file(NETWORKS_CONF) + for tmp in networks: + self.assertIn(f'{tmp}', network_config) + if __name__ == '__main__': unittest.main(verbosity=2) -- cgit v1.2.3