diff options
Diffstat (limited to 'caronte_test.go')
-rw-r--r-- | caronte_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/caronte_test.go b/caronte_test.go index b248ce3..12ec50f 100644 --- a/caronte_test.go +++ b/caronte_test.go @@ -32,12 +32,10 @@ func NewTestStorageWrapper(t *testing.T) *TestStorageWrapper { dbName := fmt.Sprintf("%x", time.Now().UnixNano()) log.WithField("dbName", dbName).Info("creating new storage") - storage := NewMongoStorage(mongoHost, port, dbName) + storage, err := NewMongoStorage(mongoHost, port, dbName) + require.NoError(t, err) ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) - err = storage.Connect(ctx) - require.NoError(t, err, "failed to connect to database") - return &TestStorageWrapper{ DbName: dbName, Storage: storage, |