testutil

package
v0.67.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SchemeSetupFunc

type SchemeSetupFunc func(s *runtime.Scheme) error

SchemeSetupFunc is a function type for adding types to a scheme

type WebhookSetupFunc

type WebhookSetupFunc func(mgr ctrl.Manager) error

WebhookSetupFunc is a function type for setting up webhooks with a manager

type WebhookSuiteConfig

type WebhookSuiteConfig struct {
	SuiteName         string
	SchemeSetupFuncs  []SchemeSetupFunc
	WebhookSetupFuncs []WebhookSetupFunc
}

WebhookSuiteConfig holds configuration for setting up a webhook test suite

type WebhookTestSuite

type WebhookTestSuite struct {
	Ctx       context.Context
	Cancel    context.CancelFunc
	K8sClient client.Client
	Cfg       *rest.Config
	TestEnv   *envtest.Environment
}

WebhookTestSuite provides common functionality for webhook test suites

func NewWebhookTestSuite

func NewWebhookTestSuite() *WebhookTestSuite

NewWebhookTestSuite creates a new webhook test suite with common functionality

func SetupWebhookTestSuite

func SetupWebhookTestSuite(webhookSetupFuncs ...WebhookSetupFunc) *WebhookTestSuite

SetupWebhookTestSuite is a simplified helper function that sets up a webhook test suite with common default configurations

func (*WebhookTestSuite) SetupSuite

func (s *WebhookTestSuite) SetupSuite(config WebhookSuiteConfig)

SetupSuite sets up the test environment for webhook testing

func (*WebhookTestSuite) TeardownSuite

func (s *WebhookTestSuite) TeardownSuite()

TeardownSuite tears down the test environment

Jump to

Keyboard shortcuts

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