MCPcopy Create free account
hub / github.com/facebook/time / TestProxyConfigInvalidCertPath

Function TestProxyConfigInvalidCertPath

ntrip/client_test.go:335–350  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

333}
334
335func TestProxyConfigInvalidCertPath(t *testing.T) {
336 c := NewClient(Config{
337 Caster: "localhost:2101",
338 Mountpoint: "/M",
339 Password: "p",
340 }, WithProxy(ProxyConfig{
341 Address: "proxy:8082",
342 CertFile: "/nonexistent/cert.pem",
343 KeyFile: "/nonexistent/key.pem",
344 }))
345
346 ctx := context.Background()
347 err := c.Connect(ctx)
348 require.Error(t, err)
349 require.Contains(t, err.Error(), "loading proxy TLS certificate")
350}
351
352func TestWithLogger(t *testing.T) {
353 customLogger := slog.New(slog.NewTextHandler(io.Discard, nil))

Callers

nothing calls this directly

Calls 4

ConnectMethod · 0.95
WithProxyFunction · 0.85
NewClientFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…