From 24a4953c00d819a4cb661f2b37d607d3fc8a31c3 Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Thu, 15 Apr 2021 09:19:07 -0400 Subject: [PATCH] E2E/CSI: ensure jobs are stopped before checking claims are released During refactoring of the CSI jobs, the EBS test dropped stopping the jobs before checking that the claims were released. --- e2e/csi/ebs.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e2e/csi/ebs.go b/e2e/csi/ebs.go index 599a2f9b0..f2ae4a152 100644 --- a/e2e/csi/ebs.go +++ b/e2e/csi/ebs.go @@ -75,6 +75,14 @@ func (tc *CSIControllerPluginEBSTest) BeforeAll(f *framework.F) { // AfterAll cleans up the volumes and plugin jobs created by the test. func (tc *CSIControllerPluginEBSTest) AfterAll(f *framework.F) { + + // Stop all jobs in test + for _, id := range tc.testJobIDs { + out, err := e2e.Command("nomad", "job", "stop", "-purge", id) + f.Assert().NoError(err, out) + } + tc.testJobIDs = []string{} + for _, volID := range tc.volumeIDs { err := waitForVolumeClaimRelease(volID, reapWait) f.Assert().NoError(err, "volume claims were not released")