Should accept custom CA if specified
(t *testing.T)
| 94 | |
| 95 | // Should accept custom CA if specified |
| 96 | func TestBuildHTTPClient_CustomCA(t *testing.T) { |
| 97 | srv := newTLSServer(t) |
| 98 | caPath := serverCAPEMPath(t, srv) |
| 99 | client, err := BuildHTTPClient(TransportConfig{TLSCACertPath: &caPath}) |
| 100 | if err != nil { |
| 101 | t.Fatalf("unexpected error: %v", err) |
| 102 | } |
| 103 | if status := get(t, client, srv.URL); status != http.StatusOK { |
| 104 | t.Errorf("expected 200, got %d", status) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | // Should accept custom CA if specified and system CAs are disabled |
| 109 | func TestBuildHTTPClient_CustomCA_DisableSystemCAs(t *testing.T) { |
nothing calls this directly
no test coverage detected