| 333 | } |
| 334 | |
| 335 | func 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 | |
| 352 | func TestWithLogger(t *testing.T) { |
| 353 | customLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) |