core: simplify newLevelDBForTesting function

This commit is contained in:
Anna Shaleva 2022-10-04 08:10:44 +03:00
parent c4c93b591e
commit 03a1cf9f59

View file

@ -9,13 +9,10 @@ import (
func newLevelDBForTesting(t testing.TB) Store {
ldbDir := t.TempDir()
dbConfig := dbconfig.DBConfiguration{
Type: "leveldb",
LevelDBOptions: dbconfig.LevelDBOptions{
DataDirectoryPath: ldbDir,
},
opts := dbconfig.LevelDBOptions{
DataDirectoryPath: ldbDir,
}
newLevelStore, err := NewLevelDBStore(dbConfig.LevelDBOptions)
newLevelStore, err := NewLevelDBStore(opts)
require.Nil(t, err, "NewLevelDBStore error")
return newLevelStore
}