Skip to content

Commit

Permalink
r/aws_batch_job_definition: 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=TestAccAWSBatchJobDefinition_disappears'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSBatchJobDefinition_disappears -timeout 180m
=== RUN   TestAccAWSBatchJobDefinition_disappears
=== PAUSE TestAccAWSBatchJobDefinition_disappears
=== CONT  TestAccAWSBatchJobDefinition_disappears
--- PASS: TestAccAWSBatchJobDefinition_disappears (9.67s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	14.046s
  • Loading branch information
ewbankkit committed Apr 19, 2021
1 parent 7690d63 commit 230695e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions aws/resource_aws_batch_job_definition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,29 @@ func TestAccAWSBatchJobDefinition_basic(t *testing.T) {
})
}

func TestAccAWSBatchJobDefinition_disappears(t *testing.T) {
var jd batch.JobDefinition
rName := acctest.RandomWithPrefix("tf-acc-test")
resourceName := "aws_batch_job_definition.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSBatch(t) },
ErrorCheck: testAccErrorCheck(t, batch.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckBatchJobDefinitionDestroy,
Steps: []resource.TestStep{
{
Config: testAccBatchJobDefinitionConfigName(rName),
Check: resource.ComposeTestCheckFunc(
testAccCheckBatchJobDefinitionExists(resourceName, &jd),
testAccCheckResourceDisappears(testAccProvider, resourceAwsBatchJobDefinition(), resourceName),
),
ExpectNonEmptyPlan: true,
},
},
})
}

func TestAccAWSBatchJobDefinition_PlatformCapabilities_EC2(t *testing.T) {
var jd batch.JobDefinition
rName := acctest.RandomWithPrefix("tf-acc-test")
Expand Down

0 comments on commit 230695e

Please sign in to comment.