Documentation ¶
Index ¶
- func PreCheck(t *testing.T)
- type TestData
- func (td TestData) CheckDestroy() resource.TestCheckFunc
- func (td TestData) CheckExistsInAWS() resource.TestCheckFunc
- func (td TestData) DataSourceTest(t *testing.T, steps []resource.TestStep)
- func (td *TestData) DataSourceWithEmptyResourceConfig() string
- func (td *TestData) DataSourceWithNonExistentIDConfig() string
- func (td TestData) DeleteResource() resource.TestCheckFunc
- func (td *TestData) EmptyConfig() string
- func (td *TestData) EmptyDataSourceConfig() string
- func (td *TestData) RandomAlphaString(n int) string
- func (td *TestData) RandomName() string
- func (td TestData) ResourceTest(t *testing.T, steps []resource.TestStep)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestData ¶
type TestData struct { // CloudFormationResourceType is the CloudFormation resource type, e.g. "AWS::S3::Bucket". CloudFormationResourceType string // ResourceName is the resource label (local name), e.g. "test". ResourceLabel string // ResourceName is the qualified resource name, e.g. "aws_s3_bucket.test". ResourceName string // TerraformResourceType is the Terraform resource type, e.g. "aws_s3_bucket". TerraformResourceType string // contains filtered or unexported fields }
func NewTestData ¶
NewTestData returns a new TestData structure.
func (TestData) CheckDestroy ¶
func (td TestData) CheckDestroy() resource.TestCheckFunc
CheckDestroy returns a TestCheckFunc that tests whether a resource has been destroyed in AWS.
func (TestData) CheckExistsInAWS ¶
func (td TestData) CheckExistsInAWS() resource.TestCheckFunc
CheckExistsInAWS returns a TestCheckFunc that tests whether a resource exists in AWS.
func (TestData) DataSourceTest ¶ added in v0.0.6
func (*TestData) DataSourceWithEmptyResourceConfig ¶ added in v0.0.7
DataSourceWithEmptyResourceConfig returns a Terraform configuration for the data source and its respective resource.
func (*TestData) DataSourceWithNonExistentIDConfig ¶ added in v0.0.7
DataSourceWithNonExistentIDConfig returns a Terraform configuration for the data source with the id attribute set to a non-existent resource.
func (TestData) DeleteResource ¶
func (td TestData) DeleteResource() resource.TestCheckFunc
DeleteResource returns a TestCheckFunc that deletes a resource in AWS.
func (*TestData) EmptyConfig ¶
EmptyConfig returns an empty (no attributes) Terraform configuration for the resource.
func (*TestData) EmptyDataSourceConfig ¶ added in v0.0.6
EmptyDataSourceConfig returns an empty (no attributes) Terraform configuration for the data source.
func (*TestData) RandomAlphaString ¶
RandomAlphaString returns a new alphabetic random string of length `n`.
func (*TestData) RandomName ¶
RandomName returns a new random name with the standard prefix `tf-acc-test`.