mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
Merge pull request #6911 from mjtrangoni/remove-buildnametocertificate
scrape/target_test.go: remove deprecated function BuildNameToCertificate()
This commit is contained in:
commit
0c4ec8d9dd
|
@ -257,7 +257,6 @@ func TestNewHTTPClientCert(t *testing.T) {
|
||||||
tlsConfig := newTLSConfig("server", t)
|
tlsConfig := newTLSConfig("server", t)
|
||||||
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
|
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
|
||||||
tlsConfig.ClientCAs = tlsConfig.RootCAs
|
tlsConfig.ClientCAs = tlsConfig.RootCAs
|
||||||
tlsConfig.BuildNameToCertificate()
|
|
||||||
server.TLS = tlsConfig
|
server.TLS = tlsConfig
|
||||||
server.StartTLS()
|
server.StartTLS()
|
||||||
defer server.Close()
|
defer server.Close()
|
||||||
|
@ -354,7 +353,6 @@ func newTLSConfig(certName string, t *testing.T) *tls.Config {
|
||||||
t.Errorf("Unable to use specified server cert (%s) & key (%v): %s", certPath, keyPath, err)
|
t.Errorf("Unable to use specified server cert (%s) & key (%v): %s", certPath, keyPath, err)
|
||||||
}
|
}
|
||||||
tlsConfig.Certificates = []tls.Certificate{cert}
|
tlsConfig.Certificates = []tls.Certificate{cert}
|
||||||
tlsConfig.BuildNameToCertificate()
|
|
||||||
return tlsConfig
|
return tlsConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue