mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-03 11:45:45 +00:00
Remove testutil.TLSTestServerWithCert in favor of the testutil/tlsserver package
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2021 the Pinniped contributors. All Rights Reserved.
|
||||
// Copyright 2021-2024 the Pinniped contributors. All Rights Reserved.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package phttp
|
||||
@@ -83,13 +83,13 @@ func TestClient(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var sawRequest bool
|
||||
server := tlsserver.TLSTestServer(t, http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) {
|
||||
server, serverCA := tlsserver.TestServerIPv4(t, http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) {
|
||||
tlsserver.AssertTLS(t, r, tt.configFunc)
|
||||
assertUserAgent(t, r)
|
||||
sawRequest = true
|
||||
}), tlsserver.RecordTLSHello)
|
||||
|
||||
rootCAs, err := cert.NewPoolFromBytes(tlsserver.TLSTestServerCA(server))
|
||||
rootCAs, err := cert.NewPoolFromBytes(serverCA)
|
||||
require.NoError(t, err)
|
||||
|
||||
c := tt.clientFunc(rootCAs)
|
||||
|
||||
Reference in New Issue
Block a user