Skip to content

Commit 54e2473

Browse files
committed
fix cleanup of acceptance test tmpdirs
1 parent 9d28501 commit 54e2473

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

helper/resource/testing.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,15 @@ func TestMain(m *testing.M) {
108108
os.Exit(1)
109109
}
110110
} else {
111+
exitCode := m.Run()
112+
111113
if acctest.TestHelper != nil {
112-
defer acctest.TestHelper.Close()
114+
err := acctest.TestHelper.Close()
115+
if err != nil {
116+
log.Printf("Error cleaning up temporary test files: %s", err)
117+
}
113118
}
114-
os.Exit(m.Run())
119+
os.Exit(exitCode)
115120
}
116121
}
117122

0 commit comments

Comments
 (0)