kubernetes/test/integration/apiserver/admissionwebhook/admission_test.go

const testNamespace

const testClientUsername

const mutation

const validation

var noSideEffects

type testContext

type testFunc

var defaultResourceFuncs

var defaultSubresourceFuncs

var customTestFuncs

var admissionExemptResources

var parentResources

var stubDataOverrides

type webhookOptions

type holder

func (h *holder) reset(t *testing.T) {}

func (h *holder) expect(gvr schema.GroupVersionResource, gvk, optionsGVK schema.GroupVersionKind, operation v1beta1.Operation, name, namespace string, object, oldObject, options bool) {}

type admissionRequest

func (h *holder) record(version string, phase string, converted bool, request *admissionRequest) {}

func (h *holder) verify(t *testing.T) {}

func (h *holder) verifyRequest(webhookOptions webhookOptions, request *admissionRequest) error {}

func (h *holder) verifyObject(converted bool, obj runtime.Object) error {}

func (h *holder) verifyOptions(options runtime.Object) error {}

type warningHandler

func (w *warningHandler) reset() {}

func (w *warningHandler) hasWarning(warning string) bool {}

func makeWarning(version string, phase string, converted bool) string {}

func (w *warningHandler) HandleWarningHeader(code int, agent string, message string) {}

// TestWebhookAdmissionWithWatchCache tests communication between API server and webhook process.
func TestWebhookAdmissionWithWatchCache(t *testing.T) {}

// TestWebhookAdmissionWithoutWatchCache tests communication between API server and webhook process.
func TestWebhookAdmissionWithoutWatchCache(t *testing.T) {}

func TestWebhookAdmissionWithCBOR(t *testing.T) {}

// testWebhookAdmission tests communication between API server and webhook process.
func testWebhookAdmission(t *testing.T, watchCache bool, reconfigureClient func(testing.TB, *rest.Config)) {}

func testResourceCreate(c *testContext) {}

func testResourceUpdate(c *testContext) {}

func testResourcePatch(c *testContext) {}

func testResourceDelete(c *testContext) {}

func testResourceDeletecollection(c *testContext) {}

func getParentGVR(gvr schema.GroupVersionResource) schema.GroupVersionResource {}

func testTokenCreate(c *testContext) {}

func testSubresourceUpdate(c *testContext) {}

func testSubresourcePatch(c *testContext) {}

func unimplemented(c *testContext) {}

// testNamespaceDelete verifies namespace-specific delete behavior:
// - ensures admission is called on first delete (which only sets deletionTimestamp and terminating state)
// - removes finalizer from namespace
// - ensures admission is called on final delete once finalizers are removed
func testNamespaceDelete(c *testContext) {}

// testDeploymentRollback verifies rollback-specific behavior:
// - creates a parent deployment
// - creates a rollback object and posts it
func testDeploymentRollback(c *testContext) {}

// testPodConnectSubresource verifies connect subresources
func testPodConnectSubresource(c *testContext) {}

// testPodBindingEviction verifies pod binding and eviction admission
func testPodBindingEviction(c *testContext) {}

// testSubresourceProxy verifies proxy subresources
func testSubresourceProxy(c *testContext) {}

func testPruningRandomNumbers(c *testContext) {}

func testNoPruningCustomFancy(c *testContext) {}

func newV1beta1WebhookHandler(t *testing.T, holder *holder, phase string, converted bool) http.Handler {}

func newV1WebhookHandler(t *testing.T, holder *holder, phase string, converted bool) http.Handler {}

func getTestFunc(gvr schema.GroupVersionResource, verb string) testFunc {}

func getStubObj(gvr schema.GroupVersionResource, resource metav1.APIResource) (*unstructured.Unstructured, error) {}

func createOrGetResource(client dynamic.Interface, gvr schema.GroupVersionResource, resource metav1.APIResource) (*unstructured.Unstructured, error) {}

func gvr(group, version, resource string) schema.GroupVersionResource {}

func gvk(group, version, kind string) schema.GroupVersionKind {}

var gvkCreateOptions

var gvkUpdateOptions

var gvkDeleteOptions

func shouldTestResource(gvr schema.GroupVersionResource, resource metav1.APIResource) bool {}

func shouldTestResourceVerb(gvr schema.GroupVersionResource, resource metav1.APIResource, verb string) bool {}

func createV1beta1ValidationWebhook(etcdClient *clientv3.Client, etcdStoragePrefix string, client clientset.Interface, endpoint, convertedEndpoint string, convertedRules []admissionregistrationv1beta1.RuleWithOperations) error {}

func createV1beta1MutationWebhook(etcdClient *clientv3.Client, etcdStoragePrefix string, client clientset.Interface, endpoint, convertedEndpoint string, convertedRules []admissionregistrationv1beta1.RuleWithOperations) error {}

func createV1ValidationWebhook(client clientset.Interface, endpoint, convertedEndpoint string, convertedRules []admissionregistrationv1.RuleWithOperations) error {}

func createV1MutationWebhook(client clientset.Interface, endpoint, convertedEndpoint string, convertedRules []admissionregistrationv1.RuleWithOperations) error {}

var localhostCert

var localhostKey