From 8e4a89bf42196308601de7544abe554df7b0df45 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Wed, 23 Jan 2019 08:16:17 -0800 Subject: IPSEC Tests: to per-test setup and tearDown don't do the setup and teardown in class methods so that with each test the config is added and deleted. that way we test that delete actually removes state. more helpful error codes from VPP for existing IPSEC state. Change-Id: I5de1578f73b935b420d4cdd85aa98d5fdcc682f6 Signed-off-by: Neale Ranns --- test/test_ipsec_tun_if_esp.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/test_ipsec_tun_if_esp.py') diff --git a/test/test_ipsec_tun_if_esp.py b/test/test_ipsec_tun_if_esp.py index e10e2a3cfcb..561f1099715 100644 --- a/test/test_ipsec_tun_if_esp.py +++ b/test/test_ipsec_tun_if_esp.py @@ -11,12 +11,11 @@ class TemplateIpsecTunIfEsp(TemplateIpsec): encryption_type = ESP - @classmethod - def setUpClass(cls): - super(TemplateIpsecTunIfEsp, cls).setUpClass() - cls.tun_if = cls.pg0 - def setUp(self): + super(TemplateIpsecTunIfEsp, self).setUp() + + self.tun_if = self.pg0 + p = self.ipv4_params tun_if = VppIpsecTunInterface(self, self.pg0, p.vpp_tun_spi, p.scapy_tun_spi, p.crypt_algo_vpp_id, -- cgit 1.2.3-korg