MCPcopy Create free account
hub / github.com/coderabbit214/document-ai / TestCreateCollection

Function TestCreateCollection

pkg/qdrant/collection_test.go:5–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestCreateCollection(t *testing.T) {
6 type args struct {
7 name string
8 createCollectionRequest CreateCollectionRequest
9 }
10 tests := []struct {
11 name string
12 args args
13 wantErr bool
14 }{
15 {
16 name: "1",
17 args: args{name: "xxx", createCollectionRequest: CreateCollectionRequest{Vectors: Vectors{
18 Size: 111,
19 Distance: "Cosine",
20 }}},
21 wantErr: false,
22 },
23 }
24 for _, tt := range tests {
25 t.Run(tt.name, func(t *testing.T) {
26 if err := CreateCollection(tt.args.name, tt.args.createCollectionRequest); (err != nil) != tt.wantErr {
27 t.Errorf("CreateCollection() error = %v, wantErr %v", err, tt.wantErr)
28 }
29 })
30 }
31}
32
33func TestGetCollection(t *testing.T) {
34 type args struct {

Callers

nothing calls this directly

Calls 1

CreateCollectionFunction · 0.85

Tested by

no test coverage detected