(t *testing.T)
| 1366 | } |
| 1367 | |
| 1368 | func TestHideHTTPClientConfigSecrets(t *testing.T) { |
| 1369 | c, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml") |
| 1370 | if err != nil { |
| 1371 | t.Errorf("Error parsing %s: %s", "testdata/http.conf.good.yml", err) |
| 1372 | } |
| 1373 | |
| 1374 | // String method must not reveal authentication credentials. |
| 1375 | s := c.String() |
| 1376 | if strings.Contains(s, "mysecret") { |
| 1377 | t.Fatal("http client config's String method reveals authentication credentials.") |
| 1378 | } |
| 1379 | } |
| 1380 | |
| 1381 | func TestDefaultFollowRedirect(t *testing.T) { |
| 1382 | cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml") |
nothing calls this directly
no test coverage detected