STATS: Python binding to access VPP statistics and counters.
[vpp.git] / test / test_ipip.py
index fc74d27..5754bd0 100644 (file)
@@ -144,6 +144,10 @@ class TestIPIP(VppTestCase):
         for p in rx:
             self.validate(p[1], p4_reply)
 
+        err = '/err/ipip4-input/packets decapsulated'
+        cnt = self.statistics.dump_str(err)
+        self.assertEqual(cnt[err], 10)
+
         # IPv4 tunnel to IPv6
         p_ip6 = IPv6(src="1:2:3::4", dst=self.pg0.remote_ip6)
         p6 = (p_ether / IP(src=self.pg1.remote_ip4,
@@ -154,6 +158,9 @@ class TestIPIP(VppTestCase):
         for p in rx:
             self.validate(p[1], p6_reply)
 
+        cnt = self.statistics.dump_str(err)
+        self.assertEqual(cnt[err], 20)
+
         #
         # Fragmentation / Reassembly and Re-fragmentation
         #
@@ -174,6 +181,9 @@ class TestIPIP(VppTestCase):
         for p in rx:
             self.validate(p[1], p4_reply)
 
+        cnt = self.statistics.dump_str(err)
+        self.assertEqual(cnt[err], 1020)
+
         f = []
         r = []
         for i in range(1, 90):