testutils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomVarTypeRegistryMock

type CustomVarTypeRegistryMock struct {
	CustomVarTypes map[string]provider.CustomVariableType
}

func (*CustomVarTypeRegistryMock) GetDescription

func (*CustomVarTypeRegistryMock) GetOptions added in v0.2.0

func (*CustomVarTypeRegistryMock) HasCustomVariableType

func (r *CustomVarTypeRegistryMock) HasCustomVariableType(ctx context.Context, customVariableType string) (bool, error)

func (*CustomVarTypeRegistryMock) ListCustomVariableTypes

func (r *CustomVarTypeRegistryMock) ListCustomVariableTypes(
	ctx context.Context,
) ([]string, error)

type DataSourceRegistryMock

type DataSourceRegistryMock struct {
	DataSources map[string]provider.DataSource
}

func (*DataSourceRegistryMock) CustomValidate

func (*DataSourceRegistryMock) Fetch

func (*DataSourceRegistryMock) GetFilterFields

func (*DataSourceRegistryMock) GetSpecDefinition

func (*DataSourceRegistryMock) GetTypeDescription

func (*DataSourceRegistryMock) HasDataSourceType

func (r *DataSourceRegistryMock) HasDataSourceType(ctx context.Context, dataSourceType string) (bool, error)

func (*DataSourceRegistryMock) ListDataSourceTypes

func (r *DataSourceRegistryMock) ListDataSourceTypes(
	ctx context.Context,
) ([]string, error)

type DynamoDBTableResource

type DynamoDBTableResource struct{}

func (*DynamoDBTableResource) CanLinkTo

func (*DynamoDBTableResource) CustomValidate

func (*DynamoDBTableResource) Deploy

func (*DynamoDBTableResource) Destroy

func (*DynamoDBTableResource) GetExamples

func (*DynamoDBTableResource) GetType

func (*DynamoDBTableResource) HasStabilised

type FunctionRegistryMock

type FunctionRegistryMock struct {
	Functions map[string]provider.Function
	CallStack function.Stack
}

func (*FunctionRegistryMock) Call

func (*FunctionRegistryMock) ForCallContext

func (f *FunctionRegistryMock) ForCallContext(stack function.Stack) provider.FunctionRegistry

func (*FunctionRegistryMock) GetDefinition

func (*FunctionRegistryMock) HasFunction

func (f *FunctionRegistryMock) HasFunction(ctx context.Context, functionName string) (bool, error)

func (*FunctionRegistryMock) ListFunctions

func (r *FunctionRegistryMock) ListFunctions(
	ctx context.Context,
) ([]string, error)

type InstanceTypeCustomVariableType

type InstanceTypeCustomVariableType struct{}

type LambdaFunctionResource added in v0.2.0

type LambdaFunctionResource struct{}

LambdaFunctionResource is a mock implementation for aws/lambda/function resource type.

func (*LambdaFunctionResource) CanLinkTo added in v0.2.0

func (*LambdaFunctionResource) CustomValidate added in v0.2.0

func (*LambdaFunctionResource) Deploy added in v0.2.0

func (*LambdaFunctionResource) Destroy added in v0.2.0

func (*LambdaFunctionResource) GetExamples added in v0.2.0

func (*LambdaFunctionResource) GetExternalState added in v0.2.0

func (*LambdaFunctionResource) GetSpecDefinition added in v0.2.0

func (*LambdaFunctionResource) GetStabilisedDependencies added in v0.2.0

func (*LambdaFunctionResource) GetType added in v0.2.0

func (*LambdaFunctionResource) GetTypeDescription added in v0.2.0

func (*LambdaFunctionResource) HasStabilised added in v0.2.0

func (*LambdaFunctionResource) IsCommonTerminal added in v0.2.0

type LinkRegistryMock added in v0.2.0

type LinkRegistryMock struct {
	Links map[string]provider.Link // key format: "typeA::typeB"
}

LinkRegistryMock provides a mock implementation of provider.LinkRegistry for testing.

func (r *LinkRegistryMock) Link(
	ctx context.Context,
	resourceTypeA string,
	resourceTypeB string,
) (provider.Link, error)

func (*LinkRegistryMock) Provider added in v0.2.0

func (r *LinkRegistryMock) Provider(
	resourceTypeA string,
	resourceTypeB string,
) (provider.Provider, error)
type MockLink struct {
	AnnotationDefs map[string]*provider.LinkAnnotationDefinition
	CardinalityA   provider.LinkCardinality
	CardinalityB   provider.LinkCardinality
}

MockLink provides a mock implementation of provider.Link for testing. Only GetAnnotationDefinitions and GetCardinality honour configured values; other methods return empty/nil outputs.

func (*MockLink) GetAnnotationDefinitions added in v0.2.0

func (*MockLink) GetCardinality added in v0.2.0

func (*MockLink) GetIntermediaryExternalState added in v0.2.0

func (*MockLink) GetKind added in v0.2.0

func (*MockLink) GetPriorityResource added in v0.2.0

func (*MockLink) GetType added in v0.2.0

func (*MockLink) GetTypeDescription added in v0.2.0

func (*MockLink) StageChanges added in v0.2.0

func (*MockLink) UpdateIntermediaryResources added in v0.2.0

func (*MockLink) UpdateResourceA added in v0.2.0

func (*MockLink) UpdateResourceB added in v0.2.0

func (l *MockLink) ValidateLink(
	ctx context.Context,
	input *provider.LinkValidateInput,
) (*provider.LinkValidateOutput, error)

type ResourceRegistryMock

type ResourceRegistryMock struct {
	Resources        map[string]provider.Resource
	TransformerNames []string
}

func (*ResourceRegistryMock) AcquireResourceLock

func (r *ResourceRegistryMock) AcquireResourceLock(
	ctx context.Context,
	input *provider.AcquireResourceLockInput,
) error

func (*ResourceRegistryMock) CustomValidate

func (*ResourceRegistryMock) Deploy

func (*ResourceRegistryMock) Destroy

func (r *ResourceRegistryMock) Destroy(
	ctx context.Context,
	resourceType string,
	input *provider.ResourceDestroyInput,
) error

func (*ResourceRegistryMock) GetSpecDefinition

func (*ResourceRegistryMock) GetStabilisedDependencies

func (*ResourceRegistryMock) GetTypeDescription

func (*ResourceRegistryMock) HasResourceInState

func (r *ResourceRegistryMock) HasResourceInState(
	ctx context.Context,
	input *provider.ResourceLookupInput,
) (bool, error)

func (*ResourceRegistryMock) HasResourceType

func (r *ResourceRegistryMock) HasResourceType(ctx context.Context, resourceType string) (bool, error)

func (*ResourceRegistryMock) IsAbstractResourceType added in v0.2.0

func (r *ResourceRegistryMock) IsAbstractResourceType(ctx context.Context, resourceType string) (bool, error)

func (*ResourceRegistryMock) ListResourceTypes

func (r *ResourceRegistryMock) ListResourceTypes(
	ctx context.Context,
) ([]string, error)

func (*ResourceRegistryMock) ListTransformers added in v0.2.0

func (r *ResourceRegistryMock) ListTransformers(
	ctx context.Context,
) ([]string, error)

func (*ResourceRegistryMock) LookupResourceInState

func (r *ResourceRegistryMock) LookupResourceInState(
	ctx context.Context,
	input *provider.ResourceLookupInput,
) (*state.ResourceState, error)

func (*ResourceRegistryMock) ReleaseResourceLock

func (r *ResourceRegistryMock) ReleaseResourceLock(
	ctx context.Context,
	instanceID string,
	resourceName string,
)

func (*ResourceRegistryMock) ReleaseResourceLocks

func (r *ResourceRegistryMock) ReleaseResourceLocks(
	ctx context.Context,
	instanceID string,
)

func (*ResourceRegistryMock) ReleaseResourceLocksAcquiredBy

func (r *ResourceRegistryMock) ReleaseResourceLocksAcquiredBy(
	ctx context.Context,
	instanceID string,
	acquiredBy string,
)

func (*ResourceRegistryMock) WithParams

type VPCDataSource

type VPCDataSource struct{}

func (*VPCDataSource) CustomValidate

func (*VPCDataSource) Fetch

func (*VPCDataSource) GetType

Jump to

Keyboard shortcuts

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