Documentation
¶
Overview ¶
Package schematest provides shared mock implementations of schema.Resource and schema.ResourceInstance for use in tests.
Index ¶
- type Resource
- type ResourceInstance
- func (m *ResourceInstance) Apply(_ context.Context, _ any) error
- func (m *ResourceInstance) Destroy(_ context.Context) error
- func (m *ResourceInstance) Name() string
- func (m *ResourceInstance) Plan(_ context.Context, _ any) (schema.Plan, error)
- func (m *ResourceInstance) Read(_ context.Context) (schema.State, error)
- func (m *ResourceInstance) References() []string
- func (m *ResourceInstance) Resource() schema.Resource
- func (m *ResourceInstance) Validate(_ context.Context, _ schema.State, _ schema.Resolver) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource struct {
N string // Name returned by Name()
}
Resource is a minimal schema.Resource stub with a configurable name.
type ResourceInstance ¶
type ResourceInstance struct {
N string // Instance name returned by Name()
RN string // Resource name returned by Resource().Name()
}
ResourceInstance is a minimal no-op schema.ResourceInstance stub.
func (*ResourceInstance) Name ¶
func (m *ResourceInstance) Name() string
func (*ResourceInstance) References ¶
func (m *ResourceInstance) References() []string
func (*ResourceInstance) Resource ¶
func (m *ResourceInstance) Resource() schema.Resource
Click to show internal directories.
Click to hide internal directories.