Should accept self-signed cert if insecure skip verify is set
(t *testing.T)
| 81 | |
| 82 | // Should accept self-signed cert if insecure skip verify is set |
| 83 | func 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 |
| 96 | func TestBuildHTTPClient_CustomCA(t *testing.T) { |
nothing calls this directly
no test coverage detected