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

Function TestInvalidTLSConfig

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

LoadTLSConfigFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected