Skip to content

Commit e511b3d

Browse files
committed
fix cleanup of acceptance test tmpdirs
1 parent 53afb31 commit e511b3d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

helper/resource/testing.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,14 @@ func TestMain(m *testing.M) {
100100
if acctest.TestHelper == nil {
101101
log.Fatal("Please configure the acctest binary driver")
102102
}
103-
defer acctest.TestHelper.Close()
104-
os.Exit(m.Run())
103+
104+
exitCode := m.Run()
105+
err := acctest.TestHelper.Close()
106+
if err != nil {
107+
log.Printf("Error cleaning up temporary test files: %s", err)
108+
}
109+
110+
os.Exit(exitCode)
105111
}
106112
}
107113

0 commit comments

Comments
 (0)