kubernetes/staging/src/k8s.io/kube-aggregator/pkg/apiserver/handler_proxy_test.go

type targetHTTPHandler

func (d *targetHTTPHandler) Reset() {}

func (d *targetHTTPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {}

func contextHandler(handler http.Handler, user user.Info) http.Handler {}

type mockedRouter

func (r *mockedRouter) ResolveEndpoint(namespace, name string, port int32) (*url.URL, error) {}

func emptyCert() []byte {}

func TestProxyHandler(t *testing.T) {}

type mockEgressDialer

func (m *mockEgressDialer) dial(ctx context.Context, net, addr string) (net.Conn, error) {}

func (m *mockEgressDialer) dialBroken(ctx context.Context, net, addr string) (net.Conn, error) {}

func newDialerAndSelector() (*mockEgressDialer, *egressselector.EgressSelector) {}

func newBrokenDialerAndSelector() (*mockEgressDialer, *egressselector.EgressSelector) {}

func TestProxyUpgrade(t *testing.T) {}

var testCACrt

var svcCrt

var svcCrtNoSAN

var svcKey

func TestGetContextForNewRequest(t *testing.T) {}

func TestTracerProvider(t *testing.T) {}

func TestNewRequestForProxyWithAuditID(t *testing.T) {}

// TestProxyCertReload verifies that the proxy reloading of certificates work
// to be able to test the reloading it starts a server with client auth enabled
// it first uses certs that does not match the client CA so the verification fails - expecting HTTP 503
// then we write correct client certs to the disk, expecting the proxy to reload the cert and use it for the next request
//
// Note: this test doesn't use apiserviceRegistrationController nor it doesn't start DynamicServingContentFromFiles controller
// instead it manually calls to updateAPIService and RunOnce to reload the certificate
func TestProxyCertReload(t *testing.T) {}

type fcInitSignal

func (s *fcInitSignal) SignalCount() int {}

func (s *fcInitSignal) Signal() {}

func (s *fcInitSignal) Wait() {}

type hookedListener

func (wl *hookedListener) Accept() (net.Conn, error) {}

func (wl *hookedListener) Close() error {}

func (wl *hookedListener) Addr() net.Addr {}

func TestFlowControlSignal(t *testing.T) {}

func getCertAndKeyPaths(t *testing.T) (string, string, string) {}

func writeCerts(certFile, keyFile string, certContent, keyContent []byte, t *testing.T) {}

func getSingleCounterValueFromRegistry(t *testing.T, r metrics.Gatherer, name string) int {}

func readTestFile(filename string) []byte {}

// cert and ca for client auth
func clientCert() []byte {}

func clientKey() []byte {}

func backendCertificate() []byte {}

func backendKey() []byte {}

func backendCaCertificate() []byte {}

func clientCaCrt() []byte {}