milvus/pkg/master/mock/collection_test.go
rain 11125bc6eb Implement the marshal logic when data to kv store
Signed-off-by: rain <boyan.wang@zilliz.com>
2020-09-15 17:55:02 +08:00

24 lines
390 B
Go

package mock
import (
"fmt"
"testing"
"time"
)
var C = Collection{
ID: uint64(11111),
Name: "test-collection",
CreateTime: uint64(time.Now().Unix()),
SegmentIDs: []uint64{uint64(10111)},
PartitionTags: []string{"default"},
}
func TestCollection2JSON(t *testing.T) {
res, err := Collection2JSON(C)
if err != nil {
t.Error(err)
}
fmt.Println(res)
}