Commit Graph

24 Commits

Author SHA1 Message Date
Anthony Stanton 8acd5641eb Librato Alerts fixes (#15118)
* Improve UpdateAlert

* Check for non-nil values before d.Set()

* Initialize struct with required values

* Improve use of d.Set()

* Rely on Terraform MaxItems check

* Simplify Read method

* Catch Retry errors

* Improve test coverage
2017-06-06 19:29:29 +03:00
Chris Johnson 9000f2fc31 provider/librato: Update based on Librato API changes (#15060)
* Update the vendored librato client

* Update librato API endpoints

- update API methods
- fix a few lint errors
2017-06-05 11:50:00 +03:00
Chris Johnson 527d79aa3c removed unused constants 2017-05-25 14:26:55 -04:00
Chris Johnson e6b4dc9b42 reduce sleep time 2017-05-25 14:22:51 -04:00
Chris Johnson 1c76194197 Respond to review feedback 2017-05-25 14:09:46 -04:00
Chris Johnson 6a0dca93af Restore previous version for now 2017-05-25 14:09:46 -04:00
Chris Johnson 78b61ad5f8 Cleanup and slight refactors 2017-05-25 14:09:46 -04:00
Chris Johnson 45c93cfb07 Separate metric test by type 2017-05-25 14:09:46 -04:00
Chris Johnson 52040c69a4 Fixup bad rebase 2017-05-25 14:09:46 -04:00
Chris Johnson 002c9985d3 Enable CRUD of metrics 2017-05-25 14:09:46 -04:00
Radek Simko 6ff5561947 librato: Work around eventual consistency of the API (#12816) 2017-03-17 16:52:38 +00:00
stack72 0867ed4961
provider/librato: Randomize the test case names as dangling resources were causing failures 2016-09-22 12:43:06 +01:00
Anthony Stanton 1d329c8927
provider/librato: Fixes for various integer type casting bugs
Fixes #8968
2016-09-22 12:42:54 +01:00
Anthony Stanton cfe7979692
provider/librator: Always send required attributes on update
Fixes #8966
2016-09-22 12:42:19 +01:00
stack72 4abfff21c0
provider/librato: Refresh space from state when not found
The librator provider is sometimes throwing errors when trying to delete
a space that is already deleted. The nightly tests shows this error:

```
Error: Error applying: 1 error(s) occurred:

                * librato_space.foobar: Error deleting space: DELETE
                * https://metrics-api.librato.com/v1/spaces/236303: 404
                * Request errors: Not Found,.
```

The Delete func should be aware if the space cannot be deleted as it is
already deleted and not error on this usecase

```
% make testacc TEST=./builtin/providers/librato TESTARGS='-run=Test'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/01 09:24:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/librato -v -run=Test -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccLibratoAlert_Basic
--- PASS: TestAccLibratoAlert_Basic (1.52s)
=== RUN   TestAccLibratoAlert_Full
--- PASS: TestAccLibratoAlert_Full (2.89s)
=== RUN   TestAccLibratoAlert_Updated
--- PASS: TestAccLibratoAlert_Updated (1.76s)
=== RUN   TestAccLibratoService_Basic
--- PASS: TestAccLibratoService_Basic (2.09s)
=== RUN   TestAccLibratoService_Updated
--- PASS: TestAccLibratoService_Updated (2.73s)
=== RUN   TestAccLibratoSpaceChart_Basic
--- PASS: TestAccLibratoSpaceChart_Basic (5.08s)
=== RUN   TestAccLibratoSpaceChart_Full
--- PASS: TestAccLibratoSpaceChart_Full (13.06s)
=== RUN   TestAccLibratoSpaceChart_Updated
--- PASS: TestAccLibratoSpaceChart_Updated (5.90s)
=== RUN   TestAccLibratoSpace_Basic
--- PASS: TestAccLibratoSpace_Basic (4.29s)
PASS
ok     	github.com/hashicorp/terraform/builtin/providers/librato       	39.321s
```
2016-09-01 09:25:53 +01:00
stack72 32ad2218cb
provider/librato: Fixing some go vet issues for the
`resourceLibratoAlertConditionsHash`
2016-08-31 21:45:03 +01:00
Anthony Stanton e4af2d56f2
fixup! Support for Librato Alerts and Services 2016-08-31 17:44:09 +02:00
Anthony Stanton 2b2920ba80
fixup! Support for Librato Alerts and Services 2016-08-31 17:26:39 +02:00
Anthony Stanton 4b2e11ac63
fixup! Support for Librato Alerts and Services 2016-08-31 17:20:08 +02:00
Anthony Stanton 783b2e5780
fixup! Support for Librato Alerts and Services 2016-08-31 17:19:53 +02:00
Anthony Stanton 2ba1c4e39a
fixup! Support for Librato Alerts and Services 2016-08-31 14:10:37 +02:00
Anthony Stanton cb66079538
Support for Librato Alerts and Services 2016-08-13 17:50:54 +02:00
James Nugent 66e7a0bfbb provider/librato: Use metric name created by agent
This allows the acceptance tests for librato to pass.
2016-04-29 16:27:51 -05:00
Henrik Hodne 8f07a2d6d5 provider/librato: Add Librato provider 2016-04-29 14:49:55 -05:00