Storage to uuids
This commit is contained in:
@@ -14,11 +14,10 @@ func tempMap(t *testing.T) *Map {
|
||||
mp.db[testNS] = map[string][]byte{}
|
||||
for i := 0; i < testN; i++ {
|
||||
p := entity.One{
|
||||
ID: "iddd-" + uuid.New().String()[:5],
|
||||
Name: "name-" + uuid.New().String()[:5],
|
||||
Type: "type-" + uuid.New().String()[:5],
|
||||
Relationship: "rshp-" + uuid.New().String()[:5],
|
||||
Title: "titl-" + uuid.New().String()[:5],
|
||||
ID: "iddd-" + uuid.New().String()[:5],
|
||||
Name: "name-" + uuid.New().String()[:5],
|
||||
Type: "type-" + uuid.New().String()[:5],
|
||||
Title: "titl-" + uuid.New().String()[:5],
|
||||
}
|
||||
o := entity.One{
|
||||
ID: "iddd-" + uuid.New().String()[:5],
|
||||
@@ -27,8 +26,8 @@ func tempMap(t *testing.T) *Map {
|
||||
Title: "titl-" + uuid.New().String()[:5],
|
||||
Text: "text-" + uuid.New().String()[:5],
|
||||
Modified: time.Now().UnixNano(),
|
||||
Connections: map[string]entity.One{p.ID: p},
|
||||
Attachments: map[string]string{"filename": "/path/to/file"},
|
||||
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)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user