test

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CtyTestDiff

func CtyTestDiff(got []*resource.Resource, dirName string, provider terraform.TerraformProvider, deserializer *resource.Deserializer, shouldUpdate bool, t *testing.T)

CtyTestDiff Deprecated

func Execute

func Execute(cmd *cobra.Command, args ...string) (output string, err error)

func ExecuteC

func ExecuteC(cmd *cobra.Command, args ...string) (c *cobra.Command, output string, err error)

func ReadTestFile

func ReadTestFile(p string) ([]byte, error)

func TestAgainstGoldenFile

func TestAgainstGoldenFile(
	got []*resource.Resource,
	ty string,
	dirName string,
	provider terraform.TerraformProvider,
	deserializer *resource.Deserializer,
	shouldUpdate bool,
	tt *testing.T,
)

func WriteTestFile

func WriteTestFile(p string, content []byte) error

Types

type Build

type Build struct{}

func (Build) IsRelease

func (b Build) IsRelease() bool

func (Build) IsUsageReportingEnabled

func (b Build) IsUsageReportingEnabled() bool

type ScanResult

type ScanResult struct {
	*require.Assertions
	*analyser.Analysis
}

func NewScanResult

func NewScanResult(t *testing.T, analysis *analyser.Analysis) *ScanResult

func (*ScanResult) AssertCoverage

func (r *ScanResult) AssertCoverage(expected int)

func (*ScanResult) AssertDeletedCount

func (r *ScanResult) AssertDeletedCount(count int)

func (*ScanResult) AssertDriftCountTotal

func (r *ScanResult) AssertDriftCountTotal(count int)

func (ScanResult) AssertInfrastructureIsInSync

func (r ScanResult) AssertInfrastructureIsInSync()

func (ScanResult) AssertInfrastructureIsNotSync

func (r ScanResult) AssertInfrastructureIsNotSync()

func (*ScanResult) AssertManagedCount

func (r *ScanResult) AssertManagedCount(count int)

func (*ScanResult) AssertResourceDeleted

func (r *ScanResult) AssertResourceDeleted(id, ty string)

func (*ScanResult) AssertResourceDriftCount

func (r *ScanResult) AssertResourceDriftCount(id, ty string, count int)

func (*ScanResult) AssertResourceHasDrift

func (r *ScanResult) AssertResourceHasDrift(id, ty string, change analyser.Change)

func (*ScanResult) AssertResourceHasNoDrift

func (r *ScanResult) AssertResourceHasNoDrift(id, ty string)

func (*ScanResult) AssertResourceUnmanaged

func (r *ScanResult) AssertResourceUnmanaged(id, ty string)

func (*ScanResult) AssertUnmanagedCount

func (r *ScanResult) AssertUnmanagedCount(count int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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