Commit Graph

5 Commits

Author SHA1 Message Date
clint shryock da0d8d5817 random some lambda tests 2017-02-16 10:43:41 -06:00
clint shryock b592f8d35d provider/aws: Fix lambda source mapping tests 2017-02-01 13:25:24 -06:00
Paul Stack cf390e86b8 provider/aws: Fix up AWS Lambda* tests (#11104)
The tests are complaining of:

```
Errors: []string{"aws_lambda_function.test_lambda: \"runtime\": required field is not set"}
```
2017-01-09 09:56:37 +01:00
Paul Stack 9d1ef78fc1 provider/aws: Refresh `aws_lambda_event_source_mapping` from state when (#8378)
NotFound

Fixes #8375

When a Lambda or an associated Event Source Mapping has been removed via
the AWS Console, Terraform throws an error similar to the following:

```
Error refreshing state: 1 error(s) occurred:

* aws_lambda_event_source_mapping.dmp_enrichment_event_source_mapping:
* ResourceNotFoundException: The resource you requested does not exist.
    status code: 404, request id: a17c641d-6868-11e6-accf-3d0ea71934fa

```

the resource should be refreshed from the state when this happens so
that subsequent plans show it needs to be recreated

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSLambdaEventSourceMapping_'
==> Checking that code complies with gofmt requirements...
/Users/stacko/Code/go/bin/stringer
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/08/22 16:15:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSLambdaEventSourceMapping_ -timeout 120m
=== RUN   TestAccAWSLambdaEventSourceMapping_basic
--- PASS: TestAccAWSLambdaEventSourceMapping_basic (120.81s)
=== RUN   TestAccAWSLambdaEventSourceMapping_disappears
--- PASS: TestAccAWSLambdaEventSourceMapping_disappears (104.08s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    224.914s
```
2016-08-22 17:05:48 +01:00
Chris Marchesi 85627630bd New resource (AWS provider) - aws_lambda_event_source_mapping 2015-11-30 07:45:38 -08:00