Skip to content

Commit

Permalink
Test that targets are well set in the state
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-henderson committed Jan 8, 2018
1 parent 694552f commit 3a52453
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions aws/resource_aws_ssm_association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ func TestAccAWSSSMAssociation_withTargets(t *testing.T) {
Config: testAccAWSSSMAssociationBasicConfigWithTargets(name),
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSSSMAssociationExists("aws_ssm_association.foo"),
resource.TestCheckResourceAttr(
"aws_ssm_association.foo", "targets.0.key", "tag:Name"),
resource.TestCheckResourceAttr(
"aws_ssm_association.foo", "targets.0.values.0", "acceptanceTest"),
),
},
},
Expand All @@ -57,6 +61,14 @@ func TestAccAWSSSMAssociation_withMultipleTargets(t *testing.T) {
Config: testAccAWSSSMAssociationBasicConfigWithMultipleTargets(name),
Check: resource.ComposeTestCheckFunc(
testAccCheckAWSSSMAssociationExists("aws_ssm_association.foo"),
resource.TestCheckResourceAttr(
"aws_ssm_association.foo", "targets.0.key", "tag:Name"),
resource.TestCheckResourceAttr(
"aws_ssm_association.foo", "targets.0.values.0", "acceptanceTest"),
resource.TestCheckResourceAttr(
"aws_ssm_association.foo", "targets.1.key", "tag:Environment"),
resource.TestCheckResourceAttr(
"aws_ssm_association.foo", "targets.1.values.0", "acceptanceTest"),
),
},
},
Expand Down

0 comments on commit 3a52453

Please sign in to comment.