kubetest

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDecryptionKeyCreated

func WithDecryptionKeyCreated() decryptionKeyCreated

func WithHelm

func WithHelm(enabled bool, oci bool) helmOption

func WithProject

func WithProject(
	repo *gittest.LocalGitRepository,
	testProject string,
	testRoot string,
) projectOption

func WithVCSSSHKeyCreated

func WithVCSSSHKeyCreated() vcsSSHKeyCreated

Types

type Environment

type Environment struct {
	ControlPlane          *envtest.Environment
	ControllerManager     manager.Manager
	HelmEnv               helmtest.Environment
	TestKubeClient        client.Client
	DynamicTestKubeClient *kube.DynamicClient
	GarbageCollector      garbage.Collector
	InventoryManager      *inventory.Manager
	RepositoryManager     vcs.RepositoryManager
	SecretManager         secret.Manager
	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()

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,
) error

func (*FakeDynamicClient) Delete

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

func (*FakeDynamicClient) Get

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