-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider/aws: Fix panic in aws_acm_certificate datasource (#10051)
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 ```
- Loading branch information
Showing
2 changed files
with
21 additions
and
45 deletions.
There are no files selected for viewing
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
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