-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
provider/aws: Fix panic in aws_acm_certificate datasource #10051
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes #10042 Fixes #9989 Another panic was found with this resource. IT essentially was causing a panic when no certificates were found. This was due to the casting of status to []string There are times when there are no statuses passed in. Made the error message a lot more generic now rather than having something like this ``` No certificate with statuses [] for domain mytestdomain.com found in this region. ``` This now becomes: ``` No certificate for domain mytestdomain.com found in this region. ``` Also, added a test to show that the panic is gone ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsAcmCertificateDataSource_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/11/11 15:11:33 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsAcmCertificateDataSource_ -timeout 120m === RUN TestAccAwsAcmCertificateDataSource_noMatchReturnsError --- PASS: TestAccAwsAcmCertificateDataSource_noMatchReturnsError (6.07s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws6.094s ```
jen20
approved these changes
Nov 11, 2016
stack72
added a commit
that referenced
this pull request
Nov 11, 2016
Fixes #10042 Fixes #9989 Another panic was found with this resource. IT essentially was causing a panic when no certificates were found. This was due to the casting of status to []string There are times when there are no statuses passed in. Made the error message a lot more generic now rather than having something like this ``` No certificate with statuses [] for domain mytestdomain.com found in this region. ``` This now becomes: ``` No certificate for domain mytestdomain.com found in this region. ``` Also, added a test to show that the panic is gone ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsAcmCertificateDataSource_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/11/11 15:11:33 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsAcmCertificateDataSource_ -timeout 120m === RUN TestAccAwsAcmCertificateDataSource_noMatchReturnsError --- PASS: TestAccAwsAcmCertificateDataSource_noMatchReturnsError (6.07s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws6.094s ```
gusmat
pushed a commit
to gusmat/terraform
that referenced
this pull request
Dec 6, 2016
…10051) Fixes hashicorp#10042 Fixes hashicorp#9989 Another panic was found with this resource. IT essentially was causing a panic when no certificates were found. This was due to the casting of status to []string There are times when there are no statuses passed in. Made the error message a lot more generic now rather than having something like this ``` No certificate with statuses [] for domain mytestdomain.com found in this region. ``` This now becomes: ``` No certificate for domain mytestdomain.com found in this region. ``` Also, added a test to show that the panic is gone ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsAcmCertificateDataSource_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/11/11 15:11:33 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsAcmCertificateDataSource_ -timeout 120m === RUN TestAccAwsAcmCertificateDataSource_noMatchReturnsError --- PASS: TestAccAwsAcmCertificateDataSource_noMatchReturnsError (6.07s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws6.094s ```
fatmcgav
pushed a commit
to fatmcgav/terraform
that referenced
this pull request
Feb 27, 2017
…10051) Fixes hashicorp#10042 Fixes hashicorp#9989 Another panic was found with this resource. IT essentially was causing a panic when no certificates were found. This was due to the casting of status to []string There are times when there are no statuses passed in. Made the error message a lot more generic now rather than having something like this ``` No certificate with statuses [] for domain mytestdomain.com found in this region. ``` This now becomes: ``` No certificate for domain mytestdomain.com found in this region. ``` Also, added a test to show that the panic is gone ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAwsAcmCertificateDataSource_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2016/11/11 15:11:33 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAwsAcmCertificateDataSource_ -timeout 120m === RUN TestAccAwsAcmCertificateDataSource_noMatchReturnsError --- PASS: TestAccAwsAcmCertificateDataSource_noMatchReturnsError (6.07s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws6.094s ```
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
locked and limited conversation to collaborators
Apr 20, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #10042
Fixes #9989
Another panic was found with this resource. IT essentially was causing a
panic when no certificates were found. This was due to the casting of
status to []string
There are times when there are no statuses passed in. Made the error
message a lot more generic now rather than having something like this
This now becomes:
Also, added a test to show that the panic is gone