Skip to content

Commit

Permalink
Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
Browse files Browse the repository at this point in the history
core: Test fix for mismatched diffs from GH-4965
  • Loading branch information
jen20 committed Feb 20, 2016
2 parents 92dc20b + c91b648 commit 938ab99
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions builtin/providers/aws/core_acceptance_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package aws

import (
"testing"

"github.com/aws/aws-sdk-go/service/ec2"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAccAWSVPC_coreMismatchedDiffs(t *testing.T) {
var vpc ec2.Vpc

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckVpcDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testMatchedDiffs,
Check: resource.ComposeTestCheckFunc(
testAccCheckVpcExists("aws_vpc.test", &vpc),
testAccCheckVpcCidr(&vpc, "10.0.0.0/16"),
resource.TestCheckResourceAttr(
"aws_vpc.test", "cidr_block", "10.0.0.0/16"),
),
},
},
})
}

const testMatchedDiffs = `resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
tags {
Name = "Repro GH-4965"
}
lifecycle {
ignore_changes = ["tags"]
}
}`

0 comments on commit 938ab99

Please sign in to comment.