diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-11-13 11:12:57 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-11-29 21:56:23 +0000 |
commit | 10d066eadefe1c74e9078fc9d6c3009866ce0e52 (patch) | |
tree | 0a7bf5ba1ee8d3ad54ee4975437700d181a4e50a /test/template_ipsec.py | |
parent | 5ad75f5deacfbf093cfff3e1d1824645e2e51424 (diff) |
make test: verify packet counters in ipsec tests
Change-Id: Ia15b40f9d91daf3a325cb8d707b22a1dbc68d9cc
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/template_ipsec.py')
-rw-r--r-- | test/template_ipsec.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/template_ipsec.py b/test/template_ipsec.py index bb45696d21c..71485c58239 100644 --- a/test/template_ipsec.py +++ b/test/template_ipsec.py @@ -194,6 +194,7 @@ class IpsecTcpTests(object): class IpsecTraTests(object): def test_tra_basic(self, count=1): """ ipsec v4 transport basic test """ + self.vapi.cli("clear errors") try: p = self.params[socket.AF_INET] vpp_tra_sa, scapy_tra_sa = self.configure_sa_tra(p) @@ -214,12 +215,16 @@ class IpsecTraTests(object): self.logger.info(self.vapi.ppcli("show error")) self.logger.info(self.vapi.ppcli("show ipsec")) + self.assert_packet_counter_equal(self.tra4_encrypt_node_name, count) + self.assert_packet_counter_equal(self.tra4_decrypt_node_name, count) + def test_tra_burst(self): """ ipsec v4 transport burst test """ self.test_tra_basic(count=257) def test_tra_basic6(self, count=1): """ ipsec v6 transport basic test """ + self.vapi.cli("clear errors") try: p = self.params[socket.AF_INET6] vpp_tra_sa, scapy_tra_sa = self.configure_sa_tra(p) @@ -240,6 +245,9 @@ class IpsecTraTests(object): self.logger.info(self.vapi.ppcli("show error")) self.logger.info(self.vapi.ppcli("show ipsec")) + self.assert_packet_counter_equal(self.tra6_encrypt_node_name, count) + self.assert_packet_counter_equal(self.tra6_decrypt_node_name, count) + def test_tra_burst6(self): """ ipsec v6 transport burst test """ self.test_tra_basic6(count=257) @@ -248,6 +256,7 @@ class IpsecTraTests(object): class IpsecTun4Tests(object): def test_tun_basic44(self, count=1): """ ipsec 4o4 tunnel basic test """ + self.vapi.cli("clear errors") try: p = self.params[socket.AF_INET] vpp_tun_sa, scapy_tun_sa = self.configure_sa_tun(p) @@ -283,6 +292,9 @@ class IpsecTun4Tests(object): self.logger.info(self.vapi.ppcli("show error")) self.logger.info(self.vapi.ppcli("show ipsec")) + self.assert_packet_counter_equal(self.tun4_encrypt_node_name, count) + self.assert_packet_counter_equal(self.tun4_decrypt_node_name, count) + def test_tun_burst44(self): """ ipsec 4o4 tunnel burst test """ self.test_tun_basic44(count=257) @@ -291,6 +303,7 @@ class IpsecTun4Tests(object): class IpsecTun6Tests(object): def test_tun_basic66(self, count=1): """ ipsec 6o6 tunnel basic test """ + self.vapi.cli("clear errors") try: p = self.params[socket.AF_INET6] vpp_tun_sa, scapy_tun_sa = self.configure_sa_tun(p) @@ -327,6 +340,9 @@ class IpsecTun6Tests(object): self.logger.info(self.vapi.ppcli("show error")) self.logger.info(self.vapi.ppcli("show ipsec")) + self.assert_packet_counter_equal(self.tun6_encrypt_node_name, count) + self.assert_packet_counter_equal(self.tun6_decrypt_node_name, count) + def test_tun_burst66(self): """ ipsec 6o6 tunnel burst test """ self.test_tun_basic66(count=257) |