fix(debug_mode): Fix FASTLY_DEBUG_MODE when used in combination with go-vcr. #561
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While running tests, if go-vcr was enabled (VCR_DISABLE was not set to '1'), and FASTLY_DEBUG_MODE was set to 'true', and no go-vcr cassettes existed for the tests being run, then any tests which sent HTTP request with bodies (PUT, PATCH, etc.) would fail as the combination of these features would result in an empty body being sent as part of the request.
This was discovered while running tests for new endpoints, so no cassettes existed, and FASTLY_DEBUG_MODE was enabled in order to monitor the actual HTTP requests and responses.