kubetest

package
v0.26.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEnabled

func WithEnabled(isEnabled bool) enabled

func WithVCSAuthSecretFor

func WithVCSAuthSecretFor(projectName string) *vcsAuthSecret

Types

type Environment

type Environment struct {
	ControlPlane          *envtest.Environment
	TestKubeClient        client.Client
	DynamicTestKubeClient *kube.ExtendedDynamicClient
	RepositoryManager     vcs.RepositoryManager
	Ctx                   context.Context
	// contains filtered or unexported fields
}

func StartKubetestEnv

func StartKubetestEnv(t testing.TB, log logr.Logger, opts ...Option) *Environment

func (Environment) Stop

func (env Environment) Stop() error

type FakeDynamicClient

type FakeDynamicClient struct {
	Err error
}

func (*FakeDynamicClient) Apply

func (client *FakeDynamicClient) Apply(
	ctx context.Context,
	obj *unstructured.Unstructured,
	fieldManager string,
	opts ...kube.ApplyOption,
) (*unstructured.Unstructured, error)

func (*FakeDynamicClient) Delete

func (client *FakeDynamicClient) Delete(ctx context.Context, obj *unstructured.Unstructured) error

func (*FakeDynamicClient) Get

func (*FakeDynamicClient) Patch

func (client *FakeDynamicClient) Patch(
	ctx context.Context,
	obj *unstructured.Unstructured,
	fieldManager string,
	opts ...kube.PatchOption,
) (*unstructured.Unstructured, error)

func (*FakeDynamicClient) RESTMapper

func (client *FakeDynamicClient) RESTMapper() meta.RESTMapper

func (*FakeDynamicClient) Update

func (client *FakeDynamicClient) Update(
	ctx context.Context,
	obj *unstructured.Unstructured,
	fieldManager string,
	opts ...kube.ApplyOption,
) error

type Option

type Option interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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