chore: import clean Agent Desk snapshot (2/7)
This commit is contained in:
25
internal/ai/rag/vectordb/provider_test.go
Normal file
25
internal/ai/rag/vectordb/provider_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
//go:build !lancedb
|
||||
|
||||
package vectordb
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"agent-desk/internal/pkg/config"
|
||||
)
|
||||
|
||||
func TestInitLanceDBWithoutBuildTagReturnsActionableError(t *testing.T) {
|
||||
err := Init(&config.VectorDBConfig{
|
||||
Type: "lancedb",
|
||||
LanceDB: config.LanceDBVectorDBConfig{
|
||||
Path: "data/lancedb",
|
||||
},
|
||||
})
|
||||
if err == nil {
|
||||
t.Fatal("Init(lancedb) error = nil, want actionable build tag error")
|
||||
}
|
||||
if !strings.Contains(err.Error(), "LanceDB provider is not built") {
|
||||
t.Fatalf("Init(lancedb) error = %q, want build tag guidance", err.Error())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user