(t *testing.T)
| 3 | import "testing" |
| 4 | |
| 5 | func 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 | |
| 33 | func TestGetCollection(t *testing.T) { |
| 34 | type args struct { |
nothing calls this directly
no test coverage detected