tester

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertHandlerReturnErrorIfGVKMismatch

func AssertHandlerReturnErrorIfGVKMismatch(t *testing.T, handler TestDecoderHandler, kind string)

AssertHandlerReturnErrorIfGVKMismatch checks error handling when wrong type of object is passed

func AssertHandlerReturnErrorIfReqObjIsMalformed

func AssertHandlerReturnErrorIfReqObjIsMalformed(t *testing.T, handler TestDecoderHandler, kind string)

AssertHandlerReturnErrorIfReqObjIsMalformed checks error handling of malformed requests

func DiscardLoggedMsg

func DiscardLoggedMsg()

DiscardLoggedMsg turns off log messages

func FilterOutStatusPatch

func FilterOutStatusPatch(operations []jsonpatch.JsonPatchOperation) []jsonpatch.JsonPatchOperation

FilterOutStatusPatch filters out the status operation

Types

type TestDecoderHandler

type TestDecoderHandler interface {
	InjectDecoder(d admission.Decoder) error
	Handle(ctx context.Context, req admission.Request) admission.Response
}

TestDecoderHandler represents a handler with a decoder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL