Skip to content

Commit

Permalink
r/aws_appmesh_virtual_node: Add '_disappears' test (hashicorp#13826).
Browse files Browse the repository at this point in the history
Acceptance test output:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSAppmesh/VirtualNode/disappears'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSAppmesh/VirtualNode/disappears -timeout 120m
=== RUN   TestAccAWSAppmesh_serial
=== RUN   TestAccAWSAppmesh_serial/VirtualNode
=== RUN   TestAccAWSAppmesh_serial/VirtualNode/disappears
--- PASS: TestAccAWSAppmesh_serial (13.06s)
    --- PASS: TestAccAWSAppmesh_serial/VirtualNode (13.06s)
        --- PASS: TestAccAWSAppmesh_serial/VirtualNode/disappears (13.06s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	13.121s
  • Loading branch information
ewbankkit committed Dec 1, 2020
1 parent 065d845 commit 47210b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions aws/resource_aws_appmesh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestAccAWSAppmesh_serial(t *testing.T) {
},
"VirtualNode": {
"basic": testAccAwsAppmeshVirtualNode_basic,
"disappears": testAccAwsAppmeshVirtualNode_disappears,
"backendClientPolicyAcm": testAccAwsAppmeshVirtualNode_backendClientPolicyAcm,
"backendClientPolicyFile": testAccAwsAppmeshVirtualNode_backendClientPolicyFile,
"backendDefaults": testAccAwsAppmeshVirtualNode_backendDefaults,
Expand Down
23 changes: 23 additions & 0 deletions aws/resource_aws_appmesh_virtual_node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,29 @@ func testAccAwsAppmeshVirtualNode_basic(t *testing.T) {
})
}

func testAccAwsAppmeshVirtualNode_disappears(t *testing.T) {
var vn appmesh.VirtualNodeData
resourceName := "aws_appmesh_virtual_node.test"
meshName := acctest.RandomWithPrefix("tf-acc-test")
vnName := acctest.RandomWithPrefix("tf-acc-test")

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(appmesh.EndpointsID, t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAppmeshVirtualNodeDestroy,
Steps: []resource.TestStep{
{
Config: testAccAppmeshVirtualNodeConfig_basic(meshName, vnName),
Check: resource.ComposeTestCheckFunc(
testAccCheckAppmeshVirtualNodeExists(resourceName, &vn),
testAccCheckResourceDisappears(testAccProvider, resourceAwsAppmeshVirtualNode(), resourceName),
),
ExpectNonEmptyPlan: true,
},
},
})
}

func testAccAwsAppmeshVirtualNode_backendClientPolicyAcm(t *testing.T) {
var vn appmesh.VirtualNodeData
var ca acmpca.CertificateAuthority
Expand Down

0 comments on commit 47210b8

Please sign in to comment.