summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-14 19:23:50 +0100
committerGitHub <noreply@github.com>2020-12-14 19:23:50 +0100
commita6b35825a78b5fe8c3a91bc4cf6abf0f50a08738 (patch)
tree25b11a3ccb981b6595b457fe35c7a917aa97258d /smoketest/scripts
parent36eb1b34e9b9b048bf91a3236849f27d44287931 (diff)
parent57392bec3d1f0d919bfdcdbb057d524df0c0fae1 (diff)
downloadvyos-1x-a6b35825a78b5fe8c3a91bc4cf6abf0f50a08738.tar.gz
vyos-1x-a6b35825a78b5fe8c3a91bc4cf6abf0f50a08738.zip
Merge pull request #644 from jack9603301/T3089
interfaces: mirror: T3089: Fix the dependency problem between interfaces
Diffstat (limited to 'smoketest/scripts')
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index d1bb9c3fe..cef920f04 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -86,13 +86,21 @@ class BasicInterfaceTest:
del self.session
def test_mirror(self):
- Success = 0
- i = 0
+
if self._test_mirror:
+
+ # Create test dependency interface
+ self.session.set(['interfaces','dummy','dum0'])
+ self.session.set(['interfaces','dummy','dum1'])
+ self.session.set(['interfaces','bonding','bond1','member','interface','dum0'])
+ self.session.set(['interfaces','bonding','bond1','member','interface','dum1'])
+
+ Success = 0
+ i = 0
# Check the two-way mirror rules of ingress and egress
for interface in self._interfaces:
- self.session.set(self._base_path + [interface, 'mirror', 'ingress', 'lo'])
- self.session.set(self._base_path + [interface, 'mirror', 'egress', 'lo'])
+ self.session.set(self._base_path + [interface, 'mirror', 'ingress', 'bond1'])
+ self.session.set(self._base_path + [interface, 'mirror', 'egress', 'bond1'])
i+=1
self.session.commit()
# Parse configuration
@@ -102,6 +110,8 @@ class BasicInterfaceTest:
else:
self.assertTrue(False)
i=0
+ self.session.delete(['interfaces','dummy'])
+ self.session.delete(['interfaces','bonding'])
else:
return None