Skip to content

Commit

Permalink
Use GinkgoT().TempDir() for automatic cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aramprice committed Jul 19, 2024
1 parent 8ecaf3b commit ea8e409
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions integration/package/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ var _ = Describe("Package", func() {
vcenterAdminCredentialUrl string
vcenterStembuildUsername string
vcenterStembuildPassword string
err error
)

BeforeEach(func() {
Expand All @@ -56,8 +55,7 @@ var _ = Describe("Package", func() {
vcenterStembuildUsername = helpers.EnvMustExist(vcenterStembuildUsernameVariable)
vcenterStembuildPassword = helpers.EnvMustExist(vcenterStembuildPasswordVariable)

workingDir, err = os.MkdirTemp(os.TempDir(), "stembuild-package-test")
Expect(err).NotTo(HaveOccurred())
workingDir = GinkgoT().TempDir() // automatically cleaned up
})

AfterEach(func() {
Expand Down

0 comments on commit ea8e409

Please sign in to comment.