@@ -18,7 +18,7 @@ func TestDB_CreateCollection(t *testing.T) {
1818 db := NewDB ()
1919
2020 t .Run ("OK" , func (t * testing.T ) {
21- c , err := db .CreateCollection (name , metadata , embeddingFunc )
21+ c , err := db .CreateCollection (name , metadata , embeddingFunc , nil )
2222 if err != nil {
2323 t .Fatal ("expected no error, got" , err )
2424 }
@@ -70,7 +70,7 @@ func TestDB_CreateCollection(t *testing.T) {
7070 })
7171
7272 t .Run ("NOK - Empty name" , func (t * testing.T ) {
73- _ , err := db .CreateCollection ("" , metadata , embeddingFunc )
73+ _ , err := db .CreateCollection ("" , metadata , embeddingFunc , nil )
7474 if err == nil {
7575 t .Fatal ("expected error, got nil" )
7676 }
@@ -89,7 +89,7 @@ func TestDB_ListCollections(t *testing.T) {
8989 // Create initial collection
9090 db := NewDB ()
9191 // We ignore the return value. CreateCollection is tested elsewhere.
92- _ , err := db .CreateCollection (name , metadata , embeddingFunc )
92+ _ , err := db .CreateCollection (name , metadata , embeddingFunc , nil )
9393 if err != nil {
9494 t .Fatal ("expected no error, got" , err )
9595 }
@@ -155,7 +155,7 @@ func TestDB_GetCollection(t *testing.T) {
155155 // Create initial collection
156156 db := NewDB ()
157157 // We ignore the return value. CreateCollection is tested elsewhere.
158- _ , err := db .CreateCollection (name , metadata , embeddingFunc )
158+ _ , err := db .CreateCollection (name , metadata , embeddingFunc , nil )
159159 if err != nil {
160160 t .Fatal ("expected no error, got" , err )
161161 }
@@ -207,15 +207,15 @@ func TestDB_GetOrCreateCollection(t *testing.T) {
207207 // Create collection so that the GetOrCreateCollection() call below only
208208 // gets it.
209209 // We ignore the return value. CreateCollection is tested elsewhere.
210- _ , err := db .CreateCollection (name , metadata , embeddingFunc )
210+ _ , err := db .CreateCollection (name , metadata , embeddingFunc , nil )
211211 if err != nil {
212212 t .Fatal ("expected no error, got" , err )
213213 }
214214
215215 // Call GetOrCreateCollection() with the same name to only get it. We pass
216216 // nil for the metadata and embeddingFunc so we can check that the returned
217217 // collection is the original one, and not a new one.
218- c , err := db .GetOrCreateCollection (name , nil , nil )
218+ c , err := db .GetOrCreateCollection (name , nil , embeddingFunc , nil )
219219 if err != nil {
220220 t .Fatal ("expected no error, got" , err )
221221 }
@@ -257,7 +257,7 @@ func TestDB_GetOrCreateCollection(t *testing.T) {
257257 db := NewDB ()
258258
259259 // Call GetOrCreateCollection()
260- c , err := db .GetOrCreateCollection (name , metadata , embeddingFunc )
260+ c , err := db .GetOrCreateCollection (name , metadata , embeddingFunc , nil )
261261 if err != nil {
262262 t .Fatal ("expected no error, got" , err )
263263 }
@@ -307,7 +307,7 @@ func TestDB_DeleteCollection(t *testing.T) {
307307 // Create initial collection
308308 db := NewDB ()
309309 // We ignore the return value. CreateCollection is tested elsewhere.
310- _ , err := db .CreateCollection (name , metadata , embeddingFunc )
310+ _ , err := db .CreateCollection (name , metadata , embeddingFunc , nil )
311311 if err != nil {
312312 t .Fatal ("expected no error, got" , err )
313313 }
@@ -339,7 +339,7 @@ func TestDB_Reset(t *testing.T) {
339339 // Create initial collection
340340 db := NewDB ()
341341 // We ignore the return value. CreateCollection is tested elsewhere.
342- _ , err := db .CreateCollection (name , metadata , embeddingFunc )
342+ _ , err := db .CreateCollection (name , metadata , embeddingFunc , nil )
343343 if err != nil {
344344 t .Fatal ("expected no error, got" , err )
345345 }
0 commit comments