From eb562850bde32f0b0b86ca0c89595cf2a0b3a211 Mon Sep 17 00:00:00 2001 From: Stepan Blyschak Date: Fri, 14 Aug 2020 19:58:30 +0300 Subject: [PATCH] [fdb.j2] fix template, since Vlan has more than one IP address Otherwise, fdb_mac_expire test fails: expire_test.FdbMacExpireTest ... ERROR", "", "======================================================================", "ERROR: fdb_mac_expire_test.FdbMacExpireTest", "----------------------------------------------------------------------", "Traceback (most recent call last):", " File \"ptftests/fdb_mac_expire_test.py\", line 35, in runTest", " self.populateFdb()", " File \"ptftests/fdb_mac_expire_test.py\", line 23, in populateFdb", " self.fdb = fdb.Fdb(self.fdb_info)", " File \"ptftests/fdb.py\", line 18, in __init__", " self._vlan_dict[prefix] = [int(i) for i in entry[1].split()]", "ValueError: invalid literal for int() with base 10: 'fc02:1000::/64'", "", "----------------------------------------------------------------------", because, v4 and v6 in rendered template is on the same line, while test will expect it on another line. Signed-off-by: Stepan Blyschak --- tests/fdb/files/fdb.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/fdb/files/fdb.j2 b/tests/fdb/files/fdb.j2 index 6c0b7c79615..e917f1c81c9 100644 --- a/tests/fdb/files/fdb.j2 +++ b/tests/fdb/files/fdb.j2 @@ -1,3 +1,4 @@ {% for vlan in minigraph_vlan_interfaces %} {{ vlan['subnet'] }} {% for ifname in minigraph_vlans[vlan['attachto']]['members'] %} {{ minigraph_port_indices[ifname] }} {% endfor %} + {% endfor %}