From 009b5356cb27192fc10ddf3830c8d1f2cbe9b518 Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Fri, 4 Sep 2020 18:23:31 +0200 Subject: [PATCH] e2e: node: topomgr: avoid plugin leak on test fail We need to make sure we tear down the sriov device plugin pod should the tests fail, to avoid leaking pods in the test environment. Signed-off-by: Francesco Romani --- test/e2e_node/topology_manager_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e_node/topology_manager_test.go b/test/e2e_node/topology_manager_test.go index 09285f42dad..406fa98b0fc 100644 --- a/test/e2e_node/topology_manager_test.go +++ b/test/e2e_node/topology_manager_test.go @@ -527,6 +527,8 @@ func runTopologyManagerNodeAlignmentSuiteTests(f *framework.Framework, configMap } sd := setupSRIOVConfigOrFail(f, configMap) + defer teardownSRIOVConfigOrFail(f, sd) + envInfo := &testEnvInfo{ numaNodes: numaNodes, sriovResourceName: sd.resourceName, @@ -695,7 +697,6 @@ func runTopologyManagerNodeAlignmentSuiteTests(f *framework.Framework, configMap } runTopologyManagerNegativeTest(f, 1, ctnAttrs, envInfo) } - teardownSRIOVConfigOrFail(f, sd) } func runTopologyManagerTests(f *framework.Framework) {