Documentation ¶
Index ¶
- Constants
- func BoolPtr(b bool) *bool
- func GetInstance(ctx context.Context, c client.Client, servicePlan *crossplane.Plan, ...) (*composite.Unstructured, error)
- func NewTestInstance(instanceID string, plan *crossplane.Plan, serviceName crossplane.ServiceName, ...) *composite.Unstructured
- func NewTestMariaDBUserInstance(instanceID, bindingID string) *composite.Unstructured
- func NewTestSecret(namespace, name string, stringData map[string]string) *corev1.Secret
- func NewTestService(serviceID string, serviceName crossplane.ServiceName) *xv1.CompositeResourceDefinition
- func NewTestServicePlan(serviceID, planID string, serviceName crossplane.ServiceName) *crossplane.Plan
- func NewTestServicePlanWithSize(serviceID, planID string, serviceName crossplane.ServiceName, name, sla string) *crossplane.Plan
- func SetupManager(t *testing.T) (*integrationtest.Manager, lager.Logger, *crossplane.Crossplane, error)
- func UpdateInstanceConditions(ctx context.Context, c client.Client, servicePlan *crossplane.Plan, ...) error
- type PrePostRunFunc
Constants ¶
const TestNamespace = "test"
TestNamespace is used for all resources created during tests.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 ¶
func SetupManager(t *testing.T) (*integrationtest.Manager, lager.Logger, *crossplane.Crossplane, error)
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 ¶
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. |