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

var testRetryBackoff

func TestV1NewFromConfig(t *testing.T) {}

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 *authorizationv1.SubjectAccessReview) {}

func (m *mockV1Service) Allow()              {}

func (m *mockV1Service) Deny()               {}

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

// newV1Authorizer creates a temporary kubeconfig file from the provided arguments and attempts to load
// a new WebhookAuthorizer from it.
func newV1Authorizer(callbackURL string, clientCert, clientKey, ca []byte, cacheTime time.Duration, metrics metrics.AuthorizerMetrics, compiler authorizationcel.Compiler, expressions []apiserver.WebhookMatchCondition, authzName string) (*WebhookAuthorizer, error) {}

func TestV1TLSConfig(t *testing.T) {}

type recorderV1Service

func (rec *recorderV1Service) Review(r *authorizationv1.SubjectAccessReview) {}

func (rec *recorderV1Service) Last() (authorizationv1.SubjectAccessReview, error) {}

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

func TestV1Webhook(t *testing.T) {}

// TestWebhookCache verifies that error responses from the server are not
// cached, but successful responses are.
func TestV1WebhookCache(t *testing.T) {}

// TestStructuredAuthzConfigFeatureEnablement verifies cel expressions can only be used when feature is enabled
func TestStructuredAuthzConfigFeatureEnablement(t *testing.T) {}

func TestWebhookMetrics(t *testing.T) {}

func BenchmarkNoCELExpressionFeatureOn(b *testing.B) {}

func BenchmarkWithOneCELExpressions(b *testing.B) {}

func BenchmarkWithOneCELExpressionsFalse(b *testing.B) {}

func BenchmarkWithTwoCELExpressions(b *testing.B) {}

func BenchmarkWithTwoCELExpressionsFalse(b *testing.B) {}

func BenchmarkWithManyCELExpressions(b *testing.B) {}

func BenchmarkWithManyCELExpressionsFalse(b *testing.B) {}

func benchmarkNewWebhookAuthorizer(b *testing.B, expressions []apiserver.WebhookMatchCondition) {}

func benchmarkWebhookAuthorize(b *testing.B, expressions []apiserver.WebhookMatchCondition) {}

// TestV1WebhookMatchConditions verifies cel expressions are compiled and evaluated correctly
func TestV1WebhookMatchConditions(t *testing.T) {}

func noopAuthorizerMetrics() metrics.AuthorizerMetrics {}

func celAuthorizerMetrics() metrics.AuthorizerMetrics {}

type celAuthorizerMetricsType