mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-20 07:26:46 +00:00
refactor: use t.TempDir() instead of os.MkdirTemp (#1832)
Signed-off-by: yuhangcangqian <cuibuwei@qq.com>
This commit is contained in:
@@ -498,13 +498,9 @@ func setupTest(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
var err error
|
||||
testhelpers.MigrationDir = filepath.Join("..", "..", "database", "migrations")
|
||||
testhelpers.PostgresTestDatabase = testhelpers.GetConnectionDetails()
|
||||
testhelpers.TempDir, err = os.MkdirTemp("", "gct-temp")
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create temp file: %v", err)
|
||||
}
|
||||
testhelpers.TempDir = t.TempDir()
|
||||
}
|
||||
|
||||
func TestStoreInDatabase(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user