Documentation ¶
Overview ¶
Package admissiontest contains fake webhooks for validating admission webhooks
Index ¶
- type FakeValidator
- func (v *FakeValidator) DeepCopyObject() runtime.Object
- func (v *FakeValidator) GetObjectKind() schema.ObjectKind
- func (v *FakeValidator) GroupVersionKind() schema.GroupVersionKind
- func (v *FakeValidator) SetGroupVersionKind(gvk schema.GroupVersionKind)
- func (v *FakeValidator) ValidateCreate() error
- func (v *FakeValidator) ValidateDelete() error
- func (v *FakeValidator) ValidateUpdate(old runtime.Object) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeValidator ¶
type FakeValidator struct { // ErrorToReturn is the error for which the FakeValidator rejects all requests ErrorToReturn error `json:"ErrorToReturn,omitempty"` // GVKToReturn is the GroupVersionKind that the webhook operates on GVKToReturn schema.GroupVersionKind }
FakeValidator provides fake validating webhook functionality for testing It implements the admission.Validator interface and rejects all requests with the same configured error or passes if ErrorToReturn is nil.
func (*FakeValidator) DeepCopyObject ¶
func (v *FakeValidator) DeepCopyObject() runtime.Object
DeepCopyObject implements admission.Validator.
func (*FakeValidator) GetObjectKind ¶
func (v *FakeValidator) GetObjectKind() schema.ObjectKind
GetObjectKind implements admission.Validator.
func (*FakeValidator) GroupVersionKind ¶
func (v *FakeValidator) GroupVersionKind() schema.GroupVersionKind
GroupVersionKind implements admission.Validator.
func (*FakeValidator) SetGroupVersionKind ¶
func (v *FakeValidator) SetGroupVersionKind(gvk schema.GroupVersionKind)
SetGroupVersionKind implements admission.Validator.
func (*FakeValidator) ValidateCreate ¶
func (v *FakeValidator) ValidateCreate() error
ValidateCreate implements admission.Validator.
func (*FakeValidator) ValidateDelete ¶
func (v *FakeValidator) ValidateDelete() error
ValidateDelete implements admission.Validator.
func (*FakeValidator) ValidateUpdate ¶
func (v *FakeValidator) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements admission.Validator.
Click to show internal directories.
Click to hide internal directories.