Merge pull request #6911 from mjtrangoni/remove-buildnametocertificate

scrape/target_test.go: remove deprecated function BuildNameToCertificate()
This commit is contained in:
Julien Pivotto 2020-03-27 17:00:19 +01:00 committed by GitHub
commit 0c4ec8d9dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,6 @@ func TestNewHTTPClientCert(t *testing.T) {
tlsConfig := newTLSConfig("server", t)
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
tlsConfig.ClientCAs = tlsConfig.RootCAs
tlsConfig.BuildNameToCertificate()
server.TLS = tlsConfig
server.StartTLS()
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)
}
tlsConfig.Certificates = []tls.Certificate{cert}
tlsConfig.BuildNameToCertificate()
return tlsConfig
}