kubernetes/staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/webhook_v1_test.go

var testRetryBackoff

type V1Service

// NewV1TestServer wraps a V1Service as an httptest.Server.
func NewV1TestServer(s V1Service, cert, key, caCert []byte) (*httptest.Server, error) {}

type mockV1Service

func (m *mockV1Service) Review(r *authenticationv1.TokenReview) {}

func (m *mockV1Service) Allow()              {}

func (m *mockV1Service) Deny()               {}

func (m *mockV1Service) HTTPStatusCode() int {}

// newV1TokenAuthenticator creates a temporary kubeconfig file from the provided
// arguments and attempts to load a new WebhookTokenAuthenticator from it.
func newV1TokenAuthenticator(serverURL string, clientCert, clientKey, ca []byte, cacheTime time.Duration, implicitAuds authenticator.Audiences, metrics AuthenticatorMetrics) (authenticator.Token, error) {}

func TestV1TLSConfig(t *testing.T) {}

type recorderV1Service

func (rec *recorderV1Service) Review(r *authenticationv1.TokenReview) {}

func (rec *recorderV1Service) HTTPStatusCode() int {}

func TestV1WebhookTokenAuthenticator(t *testing.T) {}

type authenticationV1UserInfo

func (a *authenticationV1UserInfo) GetName() string     {}

func (a *authenticationV1UserInfo) GetUID() string      {}

func (a *authenticationV1UserInfo) GetGroups() []string {}

func (a *authenticationV1UserInfo) GetExtra() map[string][]string {}

var _

// TestWebhookCache verifies that error responses from the server are not
// cached, but successful responses are. It also ensures that the webhook
// call is retried on 429 and 500+ errors
func TestV1WebhookCacheAndRetry(t *testing.T) {}

func noopAuthenticatorMetrics() AuthenticatorMetrics {}