Skip to content

Commit b8e75fe

Browse files
authored
Merge pull request #378 from hashicorp/binary-acctests-tidy-up-tmpdirs
Binary testing: Fix cleanup of temporary directories
2 parents 9d28501 + dbe9175 commit b8e75fe

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.9.1 (Unreleased)
2+
3+
BUG FIXES:
4+
5+
* Binary acceptance test driver: fix cleanup of temporary directories [GH-378]
6+
17
# 1.9.0 (March 26, 2020)
28

39
DEPRECATED:

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)