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

Function TestValidateHTTPConfig

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

Source from the content-addressed store, hash-verified

1389}
1390
1391func TestValidateHTTPConfig(t *testing.T) {
1392 cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
1393 if err != nil {
1394 t.Errorf("Error loading HTTP client config: %v", err)
1395 }
1396 err = cfg.Validate()
1397 if err != nil {
1398 t.Fatalf("Error validating %s: %s", "testdata/http.conf.good.yml", err)
1399 }
1400}
1401
1402func TestInvalidHTTPConfigs(t *testing.T) {
1403 for _, ee := range invalidHTTPClientConfigs {

Callers

nothing calls this directly

Calls 2

LoadHTTPConfigFileFunction · 0.85
ValidateMethod · 0.45

Tested by

no test coverage detected