integration

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const TestNamespace = "test"

TestNamespace is used for all resources created during tests.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

BoolPtr returns a pointer to bool.

func GetInstance

func GetInstance(ctx context.Context, c client.Client, servicePlan *crossplane.Plan, instanceID string) (*composite.Unstructured, error)

GetInstance retrieves the specified instance.

func NewTestInstance

func NewTestInstance(instanceID string, plan *crossplane.Plan, serviceName crossplane.ServiceName, serviceID, parent string) *composite.Unstructured

NewTestInstance sets up an instance for testing.

func NewTestMariaDBUserInstance

func NewTestMariaDBUserInstance(instanceID, bindingID string) *composite.Unstructured

NewTestMariaDBUserInstance sets up a specific mariadb user instance.

func NewTestSecret

func NewTestSecret(namespace, name string, stringData map[string]string) *corev1.Secret

NewTestSecret creates a new secret.

func NewTestService

func NewTestService(serviceID string, serviceName crossplane.ServiceName) *xv1.CompositeResourceDefinition

NewTestService creates a new service.

func NewTestServicePlan

func NewTestServicePlan(serviceID, planID string, serviceName crossplane.ServiceName) *crossplane.Plan

NewTestServicePlan creates a new service plan.

func NewTestServicePlanWithSize

func NewTestServicePlanWithSize(serviceID, planID string, serviceName crossplane.ServiceName, name, sla string) *crossplane.Plan

NewTestServicePlanWithSize creates a new service plan with a specified size.

func SetupManager

SetupManager creates the envtest manager setup with required objects.

func UpdateInstanceConditions

func UpdateInstanceConditions(ctx context.Context, c client.Client, servicePlan *crossplane.Plan, instance *composite.Unstructured, t xrv1.ConditionType, status corev1.ConditionStatus, reason xrv1.ConditionReason) error

UpdateInstanceConditions updates an instance's conditions within the status.

Types

type PrePostRunFunc

type PrePostRunFunc func(c client.Client) error

PrePostRunFunc is used for setup/teardown funcs.

func CreateObjects

func CreateObjects(ctx context.Context, objs []client.Object) PrePostRunFunc

CreateObjects sets up the specified objects.

func RemoveObjects

func RemoveObjects(ctx context.Context, objs []client.Object) PrePostRunFunc

RemoveObjects removes the specified objects.

Directories

Path Synopsis
test
integration
Package integration provides utilities for integration testing Crossplane.
Package integration provides utilities for integration testing Crossplane.

Jump to

Keyboard shortcuts

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