Documentation ¶
Index ¶
- func AwaitResourceDeletionOrFail(ctx context.Context, t *testing.T, cfg *envconf.Config, object k8s.Object)
- func AwaitResourceUpdateFor(ctx context.Context, t *testing.T, cfg *envconf.Config, object k8s.Object, ...)
- func AwaitResourceUpdateOrError(ctx context.Context, t *testing.T, cfg *envconf.Config, object k8s.Object)
- func DeleteResources(ctx context.Context, t *testing.T, cfg *envconf.Config, manifestDir string, ...) context.Context
- func DumpManagedResources(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
- func GetResourcesWithRESTConfig(cfg *envconf.Config) (*resources.Resources, error)
- func Identifier(object k8s.Object) string
- func ImportResources(ctx context.Context, t *testing.T, cfg *envconf.Config, dir string)
- func WaitForResourcesToBeSynced(ctx context.Context, cfg *envconf.Config, dir string, opts ...wait.Option) error
- type ResourceTestConfig
- func (r *ResourceTestConfig) AssessCreate(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
- func (r *ResourceTestConfig) AssessDelete(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
- func (r *ResourceTestConfig) AssessUpdate(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
- func (r *ResourceTestConfig) Setup(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
- func (r *ResourceTestConfig) Teardown(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AwaitResourceDeletionOrFail ¶
func AwaitResourceDeletionOrFail(ctx context.Context, t *testing.T, cfg *envconf.Config, object k8s.Object)
AwaitResourceDeletionOrFail deletes a given k8s object with a timeout of 3 minutes
func AwaitResourceUpdateFor ¶
func AwaitResourceUpdateFor( ctx context.Context, t *testing.T, cfg *envconf.Config, object k8s.Object, fn func(object k8s.Object) bool, opts ...wait.Option, )
AwaitResourceUpdateFor waits for a given resource to be updated
func AwaitResourceUpdateOrError ¶
func AwaitResourceUpdateOrError(ctx context.Context, t *testing.T, cfg *envconf.Config, object k8s.Object)
AwaitResourceUpdateOrError waits for a given resource to update with a timeout of 3 minutes
func DeleteResources ¶
func DeleteResources(ctx context.Context, t *testing.T, cfg *envconf.Config, manifestDir string, timeout wait.Option) context.Context
DeleteResources deletes previously imported resources
func DumpManagedResources ¶
DumpManagedResources dumps resources with CRDs and Providers
func GetResourcesWithRESTConfig ¶
GetResourcesWithRESTConfig returns new resource from REST config
func ImportResources ¶
ImportResources gets the resources from ./data/crs
Types ¶
type ResourceTestConfig ¶
type ResourceTestConfig struct { Kind string Obj k8s.Object AdditionalSteps map[string]func(context.Context, *testing.T, *envconf.Config) context.Context }
ResourceTestConfig is a test configuration for a resource. It contains the kind of resource and the object to be tested and then provides basic CRD tests for the resource.
func (*ResourceTestConfig) AssessCreate ¶
func (r *ResourceTestConfig) AssessCreate(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
AssessCreate checks that the resource was created successfully.
func (*ResourceTestConfig) AssessDelete ¶
func (r *ResourceTestConfig) AssessDelete(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
AssessDelete checks that the resource was deleted successfully.
func (*ResourceTestConfig) AssessUpdate ¶
func (r *ResourceTestConfig) AssessUpdate(ctx context.Context, t *testing.T, cfg *envconf.Config) context.Context
AssessUpdate does nothing for now but exists here for completeness.