From 13a58d38b3dc8065a8ba71904e143e3d69aab638 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 5 Jan 2021 21:15:02 +0100 Subject: smoketest: tunnel: fix setUp() ordering for reference base class members With commit ce809eee ("smoketest: mirror: T3169: re-add mirror / SPAN test case") the setUp() method has been re-organized not taking into account that there will already be a reference to self.session which will only be created by the base class. (cherry picked from commit cbd2d71fc85f89f322f1d5c85052034b0b57b3b9) --- smoketest/scripts/cli/test_interfaces_tunnel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'smoketest/scripts/cli') diff --git a/smoketest/scripts/cli/test_interfaces_tunnel.py b/smoketest/scripts/cli/test_interfaces_tunnel.py index f7b7f99ca..ca68cb8ba 100755 --- a/smoketest/scripts/cli/test_interfaces_tunnel.py +++ b/smoketest/scripts/cli/test_interfaces_tunnel.py @@ -67,9 +67,6 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self.local_v4 = '192.0.2.1' self.local_v6 = '2001:db8::1' - self.session.set(['interfaces', 'dummy', source_if, 'address', self.local_v4 + '/32']) - self.session.set(['interfaces', 'dummy', source_if, 'address', self.local_v6 + '/128']) - self._options = { 'tun10': ['encapsulation ipip', 'remote-ip 192.0.2.10', 'local-ip ' + self.local_v4], 'tun20': ['encapsulation gre', 'remote-ip 192.0.2.20', 'local-ip ' + self.local_v4], @@ -78,6 +75,9 @@ class TunnelInterfaceTest(BasicInterfaceTest.BaseTest): self._interfaces = list(self._options) super().setUp() + self.session.set(['interfaces', 'dummy', source_if, 'address', self.local_v4 + '/32']) + self.session.set(['interfaces', 'dummy', source_if, 'address', self.local_v6 + '/128']) + def tearDown(self): self.session.delete(['interfaces', 'dummy', source_if]) super().tearDown() -- cgit v1.2.3