check

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonAssertionFunc added in v0.7.0

type JsonAssertionFunc func(input json.RawMessage) (*bool, error)

type PlanType

type PlanType struct {
	Plan *terraform.PlanStruct
}

func InPlan

func InPlan(plan *terraform.PlanStruct) PlanType

func (PlanType) NumberOfResourcesEquals

func (p PlanType) NumberOfResourcesEquals(expected int) *testerror.Error

func (PlanType) That

func (p PlanType) That(resourceName string) ThatType

That returns a type which can be used for more fluent assertions for a given Resource

type ThatType

type ThatType struct {
	Plan         *terraform.PlanStruct
	ResourceName string
}

ThatType is a type which can be used for more fluent assertions for a given Resource

func (ThatType) DoesNotExist added in v0.7.0

func (t ThatType) DoesNotExist() *testerror.Error

DoesNotExist returns an error if the resource exists in the plan

func (ThatType) Exists

func (t ThatType) Exists() *testerror.Error

Exists returns an error if the resource does not exist in the plan

func (ThatType) Key

func (t ThatType) Key(key string) ThatTypeWithKey

Key returns a type which can be used for more fluent assertions for a given Resource & Key combination

type ThatTypeWithKey

type ThatTypeWithKey struct {
	Plan         *terraform.PlanStruct
	ResourceName string
	Key          string
}

ThatTypeWithKey is a type which can be used for more fluent assertions for a given Resource & Key combination

func (ThatTypeWithKey) ContainsJsonValue added in v0.7.0

func (twk ThatTypeWithKey) ContainsJsonValue(assertion JsonAssertionFunc) *testerror.Error

ContainsJsonValue returns a *testerror.Error which asserts upon a given JSON string set into the State by deserializing it and then asserting on it via the JsonAssertionFunc

func (ThatTypeWithKey) DoesNotExist

func (twk ThatTypeWithKey) DoesNotExist() *testerror.Error

DoesNotExist returns a *testerror.Error if the resource does not exist in the plan or if the key exists in the resource

func (ThatTypeWithKey) Exists

func (twk ThatTypeWithKey) Exists() *testerror.Error

Exists returns a *testerror.Error if the resource does not exist in the plan or if the key does not exist in the resource

func (ThatTypeWithKey) HasValue

func (twk ThatTypeWithKey) HasValue(expected interface{}) *testerror.Error

HasValue returns a CheckError if the resource does not exist in the plan or if the value of the key does not match the expected value

Jump to

Keyboard shortcuts

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