tests: fix update_path_flags for multicast in vpp_ip_route 50/26750/2
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Tue, 28 Apr 2020 15:23:31 +0000 (11:23 -0400)
committerNeale Ranns <nranns@cisco.com>
Tue, 28 Apr 2020 16:42:36 +0000 (16:42 +0000)
  add support for the case where the first path doesn't
  match the searched interface.

Type: test

Change-Id: I29bd724cfe275ec5489d32c37ef2af12d6d1102a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
test/vpp_ip_route.py

index 8838822..cd70b38 100644 (file)
@@ -678,8 +678,8 @@ class VppIpMRoute(VppObject):
         for p in range(len(self.paths)):
             if self.paths[p].nh_itf == itf:
                 self.paths[p].nh_i_flags = flags
-            self.encoded_paths[p] = self.paths[p].encode()
-            break
+                self.encoded_paths[p] = self.paths[p].encode()
+                break
 
         self._test.vapi.ip_mroute_add_del(
             route=self.encode(