milvus/internal/querynode/collection_test.go
bigsheeper 1578c13224 Refactor collection replica
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
2021-02-05 10:53:11 +08:00

25 lines
641 B
Go

package querynode
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCollection_newCollection(t *testing.T) {
collectionID := UniqueID(0)
collectionMeta := genTestCollectionMeta(collectionID, false)
collection := newCollection(collectionMeta.ID, collectionMeta.Schema)
assert.Equal(t, collection.ID(), collectionID)
}
func TestCollection_deleteCollection(t *testing.T) {
collectionID := UniqueID(0)
collectionMeta := genTestCollectionMeta(collectionID, false)
collection := newCollection(collectionMeta.ID, collectionMeta.Schema)
assert.Equal(t, collection.ID(), collectionID)
deleteCollection(collection)
}