MCPcopy Create free account
hub / github.com/prometheus/common / TestInvalidTLSConfig

Function TestInvalidTLSConfig

config/tls_config_test.go:124–135  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func 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
137func TestTLSVersionStringer(t *testing.T) {
138 if s := (TLSVersion)(tls.VersionTLS13); s.String() != "TLS13" {

Callers

nothing calls this directly

Calls 2

LoadTLSConfigFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected