Commit Graph

17 Commits

Author SHA1 Message Date
Paul Hinze 108ccf0007 builtin: Refactor resource.Retry to clarify return
Change the `RetryFunc` from a plain `error` return type to a
specialized `RetryError` which must decide whether it is
retryable or not.

Add `RetryableError` / `NonRetryableError` factory functions that
callers are meant to use to build up these errors.

This makes it eminently clear whether or not a given error is
retryable from inside the client code.

Goal here is to _not_ change any behavior, simply reflect the
existing behavior with the new, clearer, API.
2016-03-09 17:37:56 -06:00
Paul Hinze a83d1bab23 mailgun: fixup go vet problem in test 2016-01-21 13:02:26 -06:00
Paul Hinze be59831847 mailgun: poll until domain destroy takes effect
Test failures indicate that this operation doesn't always take effect
immediately:

https://travis-ci.org/hashicorp/terraform/builds/103764466

Add a simple poll to retry a few times until it does.

```
--- PASS: TestAccMailgunDomain_Basic (1.51s)
```

Verified that this does the trick by looping the test and watching the
logs for the retry behavior to kick in.
2016-01-21 09:51:08 -06:00
Paul Hinze 86af71ad6d providers/mailgun: fix sending/receiving records
The Mailgun provider was relying on an old behavior of
`ResourceData.Set` that would allow nested access to
maps. We now just build up our own maps like sane people.
2015-02-18 17:18:19 -06:00
Jeff Mitchell f2bd1f45ab Move duplicated envDefaultFunc out of each provider and into Schema. 2015-01-16 17:25:39 +00:00
Emil Hessman 68a41035a9 builtin/providers/mailgun: vet fix
Fixes the following vet report:

builtin/providers/mailgun/resource_mailgun_domain_test.go:73: arg DomainResp.Domain.Wildcard for printf verb %s of wrong type: bool
2014-12-17 12:59:07 +01:00
Sander van Harmelen 4ace4865d7 Making all function names consistent
Before all providers were using the helper.Schema approach the helper
function had these names. Now they all use names consistent with the Go
naming conventions except for these last few…
2014-12-15 15:26:17 +01:00
Sander van Harmelen 2cb1fd8987 Updated the provider to make testing a little easier
Also makes the provider more inline with the others following the TF
0.2 approach.
2014-11-18 15:21:32 +01:00
Mitchell Hashimoto 2f681c4bcc providers: fix tests 2014-09-28 17:32:39 -07:00
Mitchell Hashimoto e2534e4210 builtin: fix all compilation 2014-09-28 11:51:39 -07:00
Mitchell Hashimoto a590ed02df providers/mailgun: tests passing, compiling 2014-09-16 17:21:49 -07:00
Jack Pearkes 7cfad67920 providers/mailgun: remove dedebugging 2014-08-29 13:36:26 -07:00
Jack Pearkes 96c481578f providers/mailgun: save domain records 2014-08-29 11:39:06 -07:00
Jack Pearkes 02c93f0aea providers/mailgun: return domain response instead of domain
see also 5b02e7e9ff
2014-08-29 11:15:14 -07:00
Jack Pearkes b79834e859 providers/mailgun: smtp_password is required, no need for pub api key 2014-08-25 10:09:50 -07:00
Jack Pearkes b71ff28871 providers/mailgun: smtp_password is required 2014-08-25 10:09:50 -07:00
Jack Pearkes e3d54cb487 providers/mailgun: initial commit 2014-08-25 10:09:50 -07:00