aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_p2p_ethernet.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-11-08 11:24:34 +0100
committerDamjan Marion <dmarion@me.com>2018-11-08 11:55:06 +0000
commitf37c3ba9379c77805b40506dd72b3bc9eb1e8d08 (patch)
tree9b68e21876c1c6be4db1d08a344795e592e480a3 /test/test_p2p_ethernet.py
parentefefc6b4b219e2897e48def83352b4df52bc03a0 (diff)
make test: p2p ethernet refactor
Change-Id: I48b4b3eaa84e4174e4d0305594675bf983184fa0 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/test_p2p_ethernet.py')
-rw-r--r--test/test_p2p_ethernet.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/test/test_p2p_ethernet.py b/test/test_p2p_ethernet.py
index c901eeac39c..a4eeee0e47d 100644
--- a/test/test_p2p_ethernet.py
+++ b/test/test_p2p_ethernet.py
@@ -176,16 +176,6 @@ class P2PEthernetIPV6(VppTestCase):
count = len(packets)
return dst_if.get_capture(count)
- def verify_counters(self, counter_id, expected_value):
- counters = self.vapi.cli("sh errors").split('\n')
- counter_value = -1
- for i in range(1, len(counters)-1):
- results = counters[i].split()
- if results[1] == counter_id:
- counter_value = int(results[0])
- break
- self.assertEqual(counter_value, expected_value)
-
def test_no_p2p_subif(self):
"""standard routing without p2p subinterfaces"""
self.logger.info("FFP_TEST_START_0001")
@@ -224,7 +214,7 @@ class P2PEthernetIPV6(VppTestCase):
dst_ip="9001::100"))
self.send_packets(self.pg0, self.pg1, self.packets)
- self.verify_counters('p2p-ethernet-input', 1)
+ self.assert_packet_counter_equal('p2p-ethernet-input', 1)
route_9001.remove_vpp_config()
self.logger.info("FFP_TEST_FINISH_0002")
@@ -397,16 +387,6 @@ class P2PEthernetIPV4(VppTestCase):
count = len(packets)
return dst_if.get_capture(count)
- def verify_counters(self, counter_id, expected_value):
- counters = self.vapi.cli("sh errors").split('\n')
- counter_value = -1
- for i in range(1, len(counters)-1):
- results = counters[i].split()
- if results[1] == counter_id:
- counter_value = int(results[0])
- break
- self.assertEqual(counter_value, expected_value)
-
def create_p2p_ethernet(self, parent_if, sub_id, remote_mac):
p2p = VppP2PSubint(self, parent_if, sub_id, mactobinary(remote_mac))
p2p.admin_up()
@@ -436,7 +416,7 @@ class P2PEthernetIPV4(VppTestCase):
self.send_packets(self.pg0, self.pg1, self.packets)
- self.verify_counters('p2p-ethernet-input', 1)
+ self.assert_packet_counter_equal('p2p-ethernet-input', 1)
route_9000.remove_vpp_config()
self.logger.info("FFP_TEST_FINISH_0002")