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

Update vendors + allow default_ttl to be set to 0 #41

Merged
merged 2 commits into from
Apr 15, 2017

Conversation

aerostitch
Copy link
Contributor

As described in #20 and hashicorp/terraform#13648 and hashicorp/terraform#12910, not being able to set the default_ttl to 0 is quite an unexpected behavior.
To be able to do that we have to update the github.com/ajg/form dependency (I used make updatedeps so all have been updated, tested and had to modify fastly_test.go to fix an incompatibility), which is the 1st commit of this PR.

The 2nd removes the omitempty which removes the parameter when set to 0 and change the form encoder to keep zero values. Added a test for it.
Let me know if that's acceptable.

Thanks!

@aerostitch
Copy link
Contributor Author

Weird, the tests don't fail in go 1.8 (including the fix proposed in #39):

$ make test testrace
==> Generating...
==> Running tests...
ok  	github.com/sethvargo/go-fastly	0.436s
==> Running tests (race)...
ok  	github.com/sethvargo/go-fastly	2.266s

Will dig.

@aerostitch
Copy link
Contributor Author

That was due to go-cleanhttp dropping compatibility with go 1.6 in hashicorp/go-cleanhttp@a459706
Kept that out of the dependencies update.
The test work with 1.6 too now.

@sethvargo sethvargo merged commit 6afc817 into fastly:master Apr 15, 2017
@aerostitch aerostitch deleted the update_vendors branch April 16, 2017 00:25
@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants