Commit Graph

7 Commits

Author SHA1 Message Date
Lars Wander
4c61acc8dc provider/google: remove conflicting names from acceptance tests 2016-01-05 16:57:24 -05:00
Clint Shryock
df251f17c9 Strip 'sdk' suffix from methods; it's a remnant 2015-05-12 14:58:10 -05:00
Dan Carley
11f7b0c2ba provider/gce: Set defaults for http_health_check
In order to fix the failing test in the preceding commit when optional
params are changed from their default "computed" values.

These weren't working well with `HttpHealthCheck.Patch()` because it was
attempting to set all unspecified params to Go's type defaults (eg. 0 for
int64) which the API rejected.

Changing the call to `HttpHealthCheck.Update()` seemed to fix this but it
still didn't allow you to reset a param back to it's default by no longer
specifying it.

Settings defaults like this, which match the Terraform docs, seems like the
best all round solution. Includes two additional tests for the acceptance
tests which verify the params are really getting set correctly.
2015-05-10 21:20:40 +01:00
Dan Carley
9847850e8e provider/gce: Test updates to http_health_check
By first creating a very simple resource that mostly uses the default
values and then changing the two thresholds from their computed defaults.

This currently fails with the following error and will be fixed in a
subsequent commit:

    --- FAIL: TestAccComputeHttpHealthCheck_update (5.58s)
            testing.go:131: Step 1 error: Error applying: 1 error(s) occurred:

                    * 1 error(s) occurred:

                    * 1 error(s) occurred:

                    * Error patching HttpHealthCheck: googleapi: Error 400: Invalid value for field 'resource.port': '0'.  Must be greater than or equal to 1
                    More details:
                    Reason: invalid, Message: Invalid value for field 'resource.port': '0'.  Must be greater than or equal to 1
                    Reason: invalid, Message: Invalid value for field 'resource.checkIntervalSec': '0'.  Must be greater than or equal to 1
                    Reason: invalid, Message: Invalid value for field 'resource.timeoutSec': '0'.  Must be greater than or equal to 1
2015-05-10 21:20:32 +01:00
Dan Carley
f96e47590f provider/gce: Fix whitespace in test fixture
Mixture of hard and soft tabs, which isn't picked up by `go fmt` because
it's inside a string. Standardise on hard-tabs since that is what's used
in the rest of the code.
2015-05-10 21:06:33 +01:00
Dave Cunningham
e54a9638a8 Fix a number of healthcheck bugs 2015-02-07 19:03:18 -05:00
Dave Cunningham
038debbba9 Multiple gcp improvements and new resources 2015-01-30 10:32:35 -06:00