Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Test fix for mismatched diffs from GH-4965 #5227

Merged
merged 1 commit into from
Feb 20, 2016

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Feb 20, 2016

This test presents itself in an awkward manner as part of the AWS test suite rather than the core test suite - this is because you cannot use real providers in context tests because of circular references, and simplistic test providers in that package do not demonstrate the issue. In the interests of getting this fix in quickly and still having regression coverage for it, it was agreed to include the change here instead.

Running the test TestAccAWSVPC_coreMismatchedDiffs without the changes in d95ab75 applied leads to the following output:

$ make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSVPC_coreMismatchedDiffs"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
GO15VENDOREXPERIMENT=1 go generate $(GO15VENDOREXPERIMENT=1 go list ./... | grep -v /vendor/)
TF_ACC=1 GO15VENDOREXPERIMENT=1 go test ./builtin/providers/aws -v -run TestAccAWSVPC_coreMismatchedDiffs -timeout 120m
=== RUN   TestAccAWSVPC_coreMismatchedDiffs
--- FAIL: TestAccAWSVPC_coreMismatchedDiffs (2.26s)
    testing.go:148: Step 0 error: Error applying: 1 error(s) occurred:

        * aws_vpc.test: diffs didn't match during apply. This is a bug with Terraform and should be reported.
FAIL
exit status 1
FAIL    github.com/hashicorp/terraform/builtin/providers/aws    2.281s
make: *** [testacc] Error 1

Applying the changes in d95ab75 (pull request GH-4965) yields the following result when running the test:

$ make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSVPC_coreMismatchedDiffs"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
GO15VENDOREXPERIMENT=1 go generate $(GO15VENDOREXPERIMENT=1 go list ./... | grep -v /vendor/)
TF_ACC=1 GO15VENDOREXPERIMENT=1 go test ./builtin/providers/aws -v -run TestAccAWSVPC_coreMismatchedDiffs -timeout 120m
=== RUN   TestAccAWSVPC_coreMismatchedDiffs
--- PASS: TestAccAWSVPC_coreMismatchedDiffs (15.17s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    15.183s

The test has a rather misleading name ("AWS") such that it is actually run as part of the nightly acceptance testing. The VPC resource is quick and free to create, hence the selection.

This test presents itself in an awkward manner as part of the AWS test
suite rather than the core test suite - this is because you cannot use
real providers in context tests because of circular references, and
simplistic test providers in that package do not demonstrate the issue.
In the interests of getting this fix in quickly and still having
regression coverage for it, it was agreed to include the change here
instead.

Running the test TestAccAWSVPC_coreMismatchedDiffs without the changes
in d95ab75 applied leads to the following output:

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSVPC_coreMismatchedDiffs"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
GO15VENDOREXPERIMENT=1 go generate $(GO15VENDOREXPERIMENT=1 go list ./... | grep -v /vendor/)
TF_ACC=1 GO15VENDOREXPERIMENT=1 go test ./builtin/providers/aws -v -run TestAccAWSVPC_coreMismatchedDiffs -timeout 120m
=== RUN   TestAccAWSVPC_coreMismatchedDiffs
--- FAIL: TestAccAWSVPC_coreMismatchedDiffs (2.26s)
	testing.go:148: Step 0 error: Error applying: 1 error(s) occurred:

		* aws_vpc.test: diffs didn't match during apply. This is a bug with Terraform and should be reported.
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/aws	2.281s
make: *** [testacc] Error 1
```

Applying the changes in d95ab75 (pull request GH-4965) yields the
following result when running the test:

```
$ make testacc TEST=./builtin/providers/aws TESTARGS="-run TestAccAWSVPC_coreMismatchedDiffs"
==> Checking that code complies with gofmt requirements...
/Users/James/Code/go/bin/stringer
GO15VENDOREXPERIMENT=1 go generate $(GO15VENDOREXPERIMENT=1 go list ./... | grep -v /vendor/)
TF_ACC=1 GO15VENDOREXPERIMENT=1 go test ./builtin/providers/aws -v -run TestAccAWSVPC_coreMismatchedDiffs -timeout 120m
=== RUN   TestAccAWSVPC_coreMismatchedDiffs
--- PASS: TestAccAWSVPC_coreMismatchedDiffs (15.17s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	15.183s
```

The test has a rather misleading name ("AWS") such that it is actually run as
part of the nightly acceptance testing. The VPC resource is quick and free to
create, hence the selection.
@jen20
Copy link
Contributor Author

jen20 commented Feb 20, 2016

cc: @phinze on this one

@phinze
Copy link
Contributor

phinze commented Feb 20, 2016

LGTM

jen20 added a commit that referenced this pull request Feb 20, 2016
@jen20 jen20 merged commit 938ab99 into master Feb 20, 2016
@jen20 jen20 deleted the f-test-cover-eval-ignore-changes branch February 20, 2016 19:18
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
terraformbot pushed a commit that referenced this pull request Feb 21, 2016
[origin/master] Merge pull request #5227 from hashicorp/f-test-cover-eval-ignore-changes
938ab99
@ghost
Copy link

ghost commented Apr 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants