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

Function TestInvalidHTTPConfigs

config/http_config_test.go:1751–1762  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1749}
1750
1751func TestInvalidHTTPConfigs(t *testing.T) {
1752 for _, ee := range invalidHTTPClientConfigs {
1753 _, _, err := LoadHTTPConfigFile(ee.httpClientConfigFile)
1754 if err == nil {
1755 t.Errorf("Expected error with config %q but got none", ee.httpClientConfigFile)
1756 continue
1757 }
1758 if !strings.Contains(err.Error(), ee.errMsg) {
1759 t.Errorf("Expected error for invalid HTTP client configuration to contain %q but got: %s", ee.errMsg, err)
1760 }
1761 }
1762}
1763
1764type roundTrip struct {
1765 theResponse *http.Response

Callers

nothing calls this directly

Calls 2

LoadHTTPConfigFileFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…