(t *testing.T)
| 122 | } |
| 123 | |
| 124 | func TestInvalidTLSConfig(t *testing.T) { |
| 125 | for _, ee := range invalidTLSConfigs { |
| 126 | _, err := LoadTLSConfig("testdata/" + ee.filename) |
| 127 | if err == nil { |
| 128 | t.Error("Expected error with config but got none") |
| 129 | continue |
| 130 | } |
| 131 | if !strings.Contains(err.Error(), ee.errMsg) { |
| 132 | t.Errorf("Expected error for invalid HTTP client configuration to contain %q but got: %s", ee.errMsg, err) |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | func TestTLSVersionStringer(t *testing.T) { |
| 138 | if s := (TLSVersion)(tls.VersionTLS13); s.String() != "TLS13" { |
nothing calls this directly
no test coverage detected