Replace structured LLM dependency with Audita adapter
This commit is contained in:
25
internal/framework/llm/dependency_guard_test.go
Normal file
25
internal/framework/llm/dependency_guard_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package llm
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestModuleDoesNotReferenceInstructorGo(t *testing.T) {
|
||||
_, file, _, ok := runtime.Caller(0)
|
||||
if !ok {
|
||||
t.Fatalf("runtime caller lookup failed")
|
||||
}
|
||||
repoRoot := filepath.Clean(filepath.Join(filepath.Dir(file), "..", "..", ".."))
|
||||
|
||||
modBytes, err := os.ReadFile(filepath.Join(repoRoot, "go.mod"))
|
||||
if err != nil {
|
||||
t.Fatalf("read go.mod: %v", err)
|
||||
}
|
||||
if strings.Contains(string(modBytes), "github.com/jxnl/instructor-go") {
|
||||
t.Fatalf("unexpected instructor-go reference in go.mod")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user