Documentation ¶
Index ¶
- func CtyTestDiff(got []*resource.Resource, dirName string, provider terraform.TerraformProvider, ...)
- func Execute(cmd *cobra.Command, args ...string) (output string, err error)
- func ExecuteC(cmd *cobra.Command, args ...string) (c *cobra.Command, output string, err error)
- func ReadTestFile(p string) ([]byte, error)
- func TestAgainstGoldenFile(got []*resource.Resource, ty string, dirName string, ...)
- func TestAgainstGoldenFileNoCty(got []*resource.Resource, ty string, dirName string, ...)
- func WriteTestFile(p string, content []byte) error
- type Build
- type ScanResult
- func (r *ScanResult) AssertCoverage(expected int)
- func (r *ScanResult) AssertDeletedCount(count int)
- func (r ScanResult) AssertInfrastructureIsInSync()
- func (r ScanResult) AssertInfrastructureIsNotSync()
- func (r *ScanResult) AssertManagedCount(count int)
- func (r *ScanResult) AssertResourceDeleted(id, ty string)
- func (r *ScanResult) AssertResourceUnmanaged(id, ty string)
- func (r *ScanResult) AssertUnmanagedCount(count int)
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 ReadTestFile ¶
func TestAgainstGoldenFile ¶
func TestAgainstGoldenFileNoCty ¶ added in v0.37.0
func TestAgainstGoldenFileNoCty( got []*resource.Resource, ty string, dirName string, _ terraform.TerraformProvider, _ *resource.Deserializer, shouldUpdate bool, tt *testing.T)
That method is used to compare the result of the enumeration with the golden file. That method does not use cty and types from the terraform provider to deserialize resources. Some resources returned by the enumeration may have missing fields, and if we use cty deserialization we're gonna recreate those missing fields to respect the schema.
func WriteTestFile ¶
Types ¶
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) 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) AssertResourceUnmanaged ¶
func (r *ScanResult) AssertResourceUnmanaged(id, ty string)
func (*ScanResult) AssertUnmanagedCount ¶
func (r *ScanResult) AssertUnmanagedCount(count int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.