返回 DeepSeek-Reasonix
plugin_spec_options_test.go
根目录 / internal / boot / plugin_spec_options_test.go
1 package boot
2
3 import (
4 "net/http"
5 "testing"
6
7 "reasonix/internal/config"
8 )
9
10 func TestPluginSpecsCarryOAuthHTTPClient(t *testing.T) {
11 client := &http.Client{}
12 specs := PluginSpecsForRootWithOptions([]config.PluginEntry{{
13 Name: "remote", Type: "http", URL: "https://mcp.example.test",
14 }}, "", PluginSpecOptions{OAuthHTTPClient: client})
15 if len(specs) != 1 || specs[0].OAuthHTTPClient != client {
16 t.Fatalf("OAuth HTTP client was not carried into plugin.Spec: %+v", specs)
17 }
18 }
19
19 lines GO