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

provider/aws: Fix panic in aws_acm_certificate datasource #10051

Merged
merged 1 commit into from
Nov 11, 2016

Commits on Nov 11, 2016

  1. provider/aws: Fix panic in aws_acm_certificate datasource

    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
    ```
    stack72 committed Nov 11, 2016
    Configuration menu
    Copy the full SHA
    7aabffa View commit details
    Browse the repository at this point in the history