For storage, store as JSON rather than BSON
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package driver
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"local/dndex/storage/entity"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
)
|
||||
|
||||
func TestNewStorage(t *testing.T) {
|
||||
@@ -37,7 +37,7 @@ func fillStorage(t *testing.T, s *Storage) {
|
||||
Connections: map[string]entity.Connection{p.ID: entity.Connection{p.Name}},
|
||||
Attachments: map[string]entity.Attachment{"filename": {"/path/to/file"}},
|
||||
}
|
||||
b, err := bson.Marshal(o)
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user