diff options
author | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-03-14 12:54:36 +0100 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-03-14 15:15:49 +0000 |
commit | e5468b320a1f85c58cd888f8ac930b29f85c2e4b (patch) | |
tree | cc0d77f7f96b340b2705a44dea29adc198cec64a /test/test_acl_plugin_l2l3.py | |
parent | 53ba544d78070f029d3811b95f0cdfd8851978da (diff) |
acl-plugin: fix the l2l3 unittest to actually verify the pcap
Thanks to Paul Vinciguerra for spotting it.
Change-Id: I1f776c3c21865dbc52c4d659c62cbfa4967e15e9
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'test/test_acl_plugin_l2l3.py')
-rw-r--r-- | test/test_acl_plugin_l2l3.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/test_acl_plugin_l2l3.py b/test/test_acl_plugin_l2l3.py index 05c043e859e..0a17ed4b5ff 100644 --- a/test/test_acl_plugin_l2l3.py +++ b/test/test_acl_plugin_l2l3.py @@ -293,7 +293,6 @@ class TestACLpluginL2L3(VppTestCase): last_info[i.sw_if_index] = None dst_ip_sw_if_index = dst_ip_if.sw_if_index - return for packet in capture: l3 = IP if packet.haslayer(IP) else IPv6 @@ -318,7 +317,9 @@ class TestACLpluginL2L3(VppTestCase): data = scapy.compat.raw(ICMPv6Unknown( scapy.compat.raw(packet[l3].payload)).msgbody) udp_or_icmp = packet[l3].payload - payload_info = self.payload_to_info(data) + data_obj = Raw(data) + # FIXME: make framework believe we are on object + payload_info = self.payload_to_info(data_obj) packet_index = payload_info.index self.assertEqual(payload_info.dst, dst_ip_sw_if_index) @@ -345,8 +346,6 @@ class TestACLpluginL2L3(VppTestCase): if l4 == UDP: self.assertEqual(udp_or_icmp.sport, saved_packet[l4].sport) self.assertEqual(udp_or_icmp.dport, saved_packet[l4].dport) - else: - print("Saved packet is none") # self.assertEqual(ip.dst, host.ip4) # UDP: |