-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
database: Use TempDir to create temp test dirs.
This modifies several of the tests to use t.TempDir. The directory it creates is automatically removed when the test and all its subtests complete. It also changes out some of the cleanup logic for closing the database to use t.Cleanup instead of defer to ensure the close happens during test cleanup after the directories created by t.TempDir have been removed.
- Loading branch information
Showing
3 changed files
with
22 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters