diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-22 18:06:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-22 18:06:36 +0200 |
commit | 405ae90fd9cb44e997897c0c58253e752b220c43 (patch) | |
tree | e404c54cf43003a698ee627ac9262aa86b516bbd /smoketest/scripts/cli/test_vrf.py | |
parent | 5ae173c05defa1e230552271018133816ca00467 (diff) | |
parent | ac8dc93755b8e25434f36ab9a665c1a6a9e5bc3b (diff) | |
download | vyos-1x-405ae90fd9cb44e997897c0c58253e752b220c43.tar.gz vyos-1x-405ae90fd9cb44e997897c0c58253e752b220c43.zip |
Merge pull request #3837 from vyos/mergify/bp/sagitta/pr-3834
interfaces: T6592: moving an interface between VRF instances failed (backport #3834)
Diffstat (limited to 'smoketest/scripts/cli/test_vrf.py')
-rwxr-xr-x | smoketest/scripts/cli/test_vrf.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/smoketest/scripts/cli/test_vrf.py b/smoketest/scripts/cli/test_vrf.py index 243397dc2..176882ca5 100755 --- a/smoketest/scripts/cli/test_vrf.py +++ b/smoketest/scripts/cli/test_vrf.py @@ -25,6 +25,7 @@ from vyos.ifconfig import Interface from vyos.ifconfig import Section from vyos.utils.file import read_file from vyos.utils.network import get_interface_config +from vyos.utils.network import get_vrf_tableid from vyos.utils.network import is_intf_addr_assigned from vyos.utils.network import interface_exists from vyos.utils.system import sysctl_read @@ -111,8 +112,7 @@ class VRFTest(VyOSUnitTestSHIM.TestCase): frrconfig = self.getFRRconfig(f'vrf {vrf}') self.assertIn(f' vni {table}', frrconfig) - tmp = get_interface_config(vrf) - self.assertEqual(int(table), tmp['linkinfo']['info_data']['table']) + self.assertEqual(int(table), get_vrf_tableid(vrf)) # Increment table ID for the next run table = str(int(table) + 1) @@ -266,8 +266,7 @@ class VRFTest(VyOSUnitTestSHIM.TestCase): for address in addresses: self.assertTrue(is_intf_addr_assigned(interface, address)) # Verify VRF table ID - tmp = get_interface_config(vrf) - self.assertEqual(int(table), tmp['linkinfo']['info_data']['table']) + self.assertEqual(int(table), get_vrf_tableid(vrf)) # Verify interface is assigned to VRF tmp = get_interface_config(interface) |