|
@@ -85,7 +85,7 @@ func GetTestEndpoint() (*api.Client, string) {
|
|
|
var serverMutex sync.Mutex
|
|
|
var serverReady bool
|
|
|
|
|
|
-func startServer(ctx context.Context, ollamaHost string) error {
|
|
|
+func startServer(t *testing.T, ctx context.Context, ollamaHost string) error {
|
|
|
// Make sure the server has been built
|
|
|
CLIName, err := filepath.Abs("../ollama")
|
|
|
if err != nil {
|
|
@@ -200,7 +200,7 @@ func InitServerConnection(ctx context.Context, t *testing.T) (*api.Client, strin
|
|
|
}
|
|
|
lifecycle.ServerLogFile = fp.Name()
|
|
|
fp.Close()
|
|
|
- require.NoError(t, startServer(ctx, testEndpoint))
|
|
|
+ require.NoError(t, startServer(t, ctx, testEndpoint))
|
|
|
}
|
|
|
|
|
|
return client, testEndpoint, func() {
|