testing

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEnvTest = &envtest.Environment{
	CRDDirectoryPaths:     []string{filepath.Join(os.Getenv("PROJECT_ROOT"), "config", "crd", "bases")},
	BinaryAssetsDirectory: filepath.Join(os.Getenv("PROJECT_ROOT"), "bin", "k8s", "1.26.0-linux-amd64"),
}
View Source
var LocalProxyEnvTest = &envtest.Environment{
	Config:                &rest.Config{Host: "localhost:8080"},
	BinaryAssetsDirectory: filepath.Join(os.Getenv("PROJECT_ROOT"), "bin", "k8s", "1.26.0-linux-amd64"),
	CRDDirectoryPaths:     []string{filepath.Join(os.Getenv("PROJECT_ROOT"), "config", "crd", "bases")},
}
View Source
var Suite struct {
	K8sClient     client.Client
	Config        *rest.Config
	Scheme        *runtime.Scheme
	K8sYamlClient kubectl.YAMLClient
	NewManager    func(options manager.Options) manager.Manager
	Manager       manager.Manager
	Context       context.Context
	CancelFunc    context.CancelFunc
}

Functions

func AddToSchemes

func AddToSchemes(fns ...func(s *runtime.Scheme) error) *runtime.Scheme

func CreateResource

func CreateResource(res client.Object)

func DeleteResource

func DeleteResource(res client.Object)

func GetResource

func GetResource(nn types.NamespacedName, resource client.Object) error

func Promise

func Promise(testFn func(g Gomega), timeout ...string)

func Reconcile

func Reconcile(reconciler reconcile.Reconciler, nn types.NamespacedName)

func ReconcileForObject

func ReconcileForObject(reconciler reconcile.Reconciler, obj client.Object)

func SetupKubernetes

func SetupKubernetes(scheme *runtime.Scheme, envTest *envtest.Environment)

Types

This section is empty.

Jump to

Keyboard shortcuts

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