From 4d3acd6e6fb0b5600cc65bb962c99305f10f92c1 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 29 Nov 2020 19:48:26 +0100 Subject: smoketest: dhcpv6-relay: T3095: verify the verify() section --- smoketest/scripts/cli/test_service_dhcpv6-relay.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'smoketest') diff --git a/smoketest/scripts/cli/test_service_dhcpv6-relay.py b/smoketest/scripts/cli/test_service_dhcpv6-relay.py index b0f17acaa..f72cf573b 100755 --- a/smoketest/scripts/cli/test_service_dhcpv6-relay.py +++ b/smoketest/scripts/cli/test_service_dhcpv6-relay.py @@ -59,10 +59,20 @@ class TestServiceDHCPv6Relay(unittest.TestCase): dhcpv6_server = '2001:db8::ffff' hop_count = '20' - self.session.set(base_path + ['upstream-interface', upstream_if, 'address', dhcpv6_server]) self.session.set(base_path + ['use-interface-id-option']) self.session.set(base_path + ['max-hop-count', hop_count]) + # check validate() - Must set at least one listen and upstream + # interface addresses. + with self.assertRaises(ConfigSessionError): + self.session.commit() + self.session.set(base_path + ['upstream-interface', upstream_if, 'address', dhcpv6_server]) + + # check validate() - Must set at least one listen and upstream + # interface addresses. + with self.assertRaises(ConfigSessionError): + self.session.commit() + # add listener on all ethernet interfaces except the upstream interface for tmp in interfaces: if tmp == upstream_if: -- cgit v1.2.3