multi: rename chan DB Open method to OpenForTesting
This commit is contained in:
24 files changed
+101
-331
No files matched your search
@@ -37,11 +37,7 @@ var (
|
||||
func initHintCache(t *testing.T) *channeldb.HeightHintCache {
|
||||
t.Helper()
|
||||
|
||||
db, err := channeldb.Open(t.TempDir())
|
||||
require.NoError(t, err, "unable to create db")
|
||||
t.Cleanup(func() {
|
||||
require.NoError(t, db.Close())
|
||||
})
|
||||
db := channeldb.OpenForTesting(t, t.TempDir())
|
||||
|
||||
testCfg := channeldb.CacheConfig{
|
||||
QueryDisable: false,
|
||||
|
||||
@@ -33,11 +33,7 @@ var (
|
||||
func initHintCache(t *testing.T) *channeldb.HeightHintCache {
|
||||
t.Helper()
|
||||
|
||||
db, err := channeldb.Open(t.TempDir())
|
||||
require.NoError(t, err, "unable to create db")
|
||||
t.Cleanup(func() {
|
||||
require.NoError(t, db.Close())
|
||||
})
|
||||
db := channeldb.OpenForTesting(t, t.TempDir())
|
||||
|
||||
testCfg := channeldb.CacheConfig{
|
||||
QueryDisable: false,
|
||||
|
||||
@@ -1906,10 +1906,8 @@ func TestInterfaces(t *testing.T, targetBackEnd string) {
|
||||
|
||||
// Initialize a height hint cache for each notifier.
|
||||
tempDir := t.TempDir()
|
||||
db, err := channeldb.Open(tempDir)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create db: %v", err)
|
||||
}
|
||||
db := channeldb.OpenForTesting(t, tempDir)
|
||||
|
||||
testCfg := channeldb.CacheConfig{
|
||||
QueryDisable: false,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user