schematest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package schematest provides shared mock implementations of schema.Resource and schema.ResourceInstance for use in tests.

Index

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.

func (*Resource) Name

func (m *Resource) Name() string

func (*Resource) New

func (*Resource) Schema

func (m *Resource) Schema() []schema.Attribute

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) Apply

func (m *ResourceInstance) Apply(_ context.Context, _ any) error

func (*ResourceInstance) Destroy

func (m *ResourceInstance) Destroy(_ context.Context) error

func (*ResourceInstance) Name

func (m *ResourceInstance) Name() string

func (*ResourceInstance) Plan

func (m *ResourceInstance) Plan(_ context.Context, _ any) (schema.Plan, error)

func (*ResourceInstance) Read

func (*ResourceInstance) References

func (m *ResourceInstance) References() []string

func (*ResourceInstance) Resource

func (m *ResourceInstance) Resource() schema.Resource

func (*ResourceInstance) Validate

Jump to

Keyboard shortcuts

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