mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-24 06:25:47 +00:00
added memstorage to test instead of a file based DB
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
a9c5d0a5a5
commit
ff65b57d89
@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/planetmint/planetmint-go/util/mocks"
|
"github.com/planetmint/planetmint-go/util/mocks"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
|
"github.com/syndtr/goleveldb/leveldb/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -24,7 +25,7 @@ const (
|
|||||||
func TestGMonitorActiveParticipants(t *testing.T) {
|
func TestGMonitorActiveParticipants(t *testing.T) {
|
||||||
monitor.LazyLoadMonitorMQTTClient()
|
monitor.LazyLoadMonitorMQTTClient()
|
||||||
cfg := config.GetConfig()
|
cfg := config.GetConfig()
|
||||||
db, err := leveldb.OpenFile("./activeActors.db", nil)
|
db, err := leveldb.Open(storage.NewMemStorage(), nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ func TestCleanupRemoval(t *testing.T) {
|
|||||||
monitor.LazyLoadMonitorMQTTClient()
|
monitor.LazyLoadMonitorMQTTClient()
|
||||||
|
|
||||||
cfg := config.GetConfig()
|
cfg := config.GetConfig()
|
||||||
db, err := leveldb.OpenFile("./activeActors.db", nil)
|
db, err := leveldb.Open(storage.NewMemStorage(), nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
@ -79,7 +80,7 @@ func TestCleanupPrecisionTest(t *testing.T) {
|
|||||||
monitor.LazyLoadMonitorMQTTClient()
|
monitor.LazyLoadMonitorMQTTClient()
|
||||||
|
|
||||||
cfg := config.GetConfig()
|
cfg := config.GetConfig()
|
||||||
db, err := leveldb.OpenFile("./activeActors.db", nil)
|
db, err := leveldb.Open(storage.NewMemStorage(), nil)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
defer db.Close()
|
defer db.Close()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user