core: simplify newLevelDBForTesting function
This commit is contained in:
parent
c4c93b591e
commit
03a1cf9f59
1 changed files with 3 additions and 6 deletions
|
@ -9,13 +9,10 @@ import (
|
||||||
|
|
||||||
func newLevelDBForTesting(t testing.TB) Store {
|
func newLevelDBForTesting(t testing.TB) Store {
|
||||||
ldbDir := t.TempDir()
|
ldbDir := t.TempDir()
|
||||||
dbConfig := dbconfig.DBConfiguration{
|
opts := dbconfig.LevelDBOptions{
|
||||||
Type: "leveldb",
|
|
||||||
LevelDBOptions: dbconfig.LevelDBOptions{
|
|
||||||
DataDirectoryPath: ldbDir,
|
DataDirectoryPath: ldbDir,
|
||||||
},
|
|
||||||
}
|
}
|
||||||
newLevelStore, err := NewLevelDBStore(dbConfig.LevelDBOptions)
|
newLevelStore, err := NewLevelDBStore(opts)
|
||||||
require.Nil(t, err, "NewLevelDBStore error")
|
require.Nil(t, err, "NewLevelDBStore error")
|
||||||
return newLevelStore
|
return newLevelStore
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue