MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestExtractSessionID_Headers

Function TestExtractSessionID_Headers

sdk/cliproxy/auth/selector_test.go:642–653  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

640}
641
642func TestExtractSessionID_Headers(t *testing.T) {
643 t.Parallel()
644
645 headers := make(http.Header)
646 headers.Set("X-Session-ID", "my-explicit-session")
647
648 got := ExtractSessionID(headers, nil, nil)
649 want := "header:my-explicit-session"
650 if got != want {
651 t.Errorf("ExtractSessionID() with header = %q, want %q", got, want)
652 }
653}
654
655func TestExtractSessionID_CodexSessionIDHeader(t *testing.T) {
656 t.Parallel()

Callers

nothing calls this directly

Calls 2

ExtractSessionIDFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected