resourceservicemock

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(options ...Option) *mockResourceService

Create returns a new mock ResourceService configured with the provided options. The returned value satisfies provider.ResourceService, cast to *Mock to inspect the recorded DeployCalls / DestroyCalls.

Types

type DeployCall

type DeployCall struct {
	ResourceType string
	Input        *provider.ResourceDeployServiceInput
}

DeployCall captures the arguments of a single Deploy invocation.

type DestroyCall

type DestroyCall struct {
	ResourceType string
	Input        *provider.ResourceDestroyInput
}

DestroyCall captures the arguments of a single Destroy invocation.

type Mock

type Mock = mockResourceService

Mock is the concrete mock type, exposed so tests can read the recorded calls.

type Option

type Option func(*mockResourceService)

Option configures the mock resource service.

func WithDeployError

func WithDeployError(err error) Option

WithDeployError sets the error returned by Deploy.

func WithDeployOutput

func WithDeployOutput(output *provider.ResourceDeployOutput) Option

WithDeployOutput sets the output returned by Deploy.

func WithDestroyError

func WithDestroyError(err error) Option

WithDestroyError sets the error returned by Destroy.

func WithLookupError

func WithLookupError(err error) Option

WithLookupError sets the error returned by LookupResourceInState.

func WithLookupResourceInState

func WithLookupResourceInState(resourceState *state.ResourceState) Option

WithLookupResourceInState sets the resource state returned by LookupResourceInState.

Jump to

Keyboard shortcuts

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