MCPcopy
hub / github.com/kagent-dev/kagent / TestBuildHTTPClient_InsecureSkipVerify

Function TestBuildHTTPClient_InsecureSkipVerify

go/adk/pkg/models/tls_test.go:83–93  ·  view source on GitHub ↗

Should accept self-signed cert if insecure skip verify is set

(t *testing.T)

Source from the content-addressed store, hash-verified

81
82// Should accept self-signed cert if insecure skip verify is set
83func TestBuildHTTPClient_InsecureSkipVerify(t *testing.T) {
84 srv := newTLSServer(t)
85 insecure := true
86 client, err := BuildHTTPClient(TransportConfig{TLSInsecureSkipVerify: &insecure})
87 if err != nil {
88 t.Fatalf("unexpected error: %v", err)
89 }
90 if status := get(t, client, srv.URL); status != http.StatusOK {
91 t.Errorf("expected 200, got %d", status)
92 }
93}
94
95// Should accept custom CA if specified
96func TestBuildHTTPClient_CustomCA(t *testing.T) {

Callers

nothing calls this directly

Calls 3

newTLSServerFunction · 0.85
BuildHTTPClientFunction · 0.85
getFunction · 0.85

Tested by

no test coverage detected