This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Conversation
38b6036 to
a377e60
Compare
magnushoerberg
approved these changes
Mar 15, 2024
Contributor
magnushoerberg
left a comment
There was a problem hiding this comment.
Good first step, lets look into merging this into terraform-provider-cloudamqp as next step.
After that we should remove sling and just use the *http.Client directly.
tbroden84
added a commit
to cloudamqp/terraform-provider-cloudamqp
that referenced
this pull request
May 2, 2024
### WHY are these changes introduced? During development to have the confidence to change, update, add new features, improvements and fixes. Cover the provider with tests as much as possible. For this Terraform acceptance test (extension of Go test) can be used. A downside to only relying on acceptance tests, is that all tests require infrastructure resources. Which takes time to create, update and clean up. With the use of Go VCR, it's possible to record the communication to the API backend and store these as fixtures (cassettes). Then replay these instead of doing the real requests. This will speed up each test significantly. Requires: 84codes/go-api#48 (merged) ### WHAT is this pull request doing? - Adapt the Provider to be able to use Go VCR via http client when running acceptance test. - Record request/responses to fixtures - Replay requests/responses from fixtures - Append resource configurations. - Use templated configurations with dynamic values. - Update Github CI workflow to run all tests on commit. ### HOW can this pull request be tested? Run tests manually or through automated Github CI workflow. --------- Co-authored-by: Magnus Hörberg <magnus.hoerberg@gmail.com> Co-authored-by: Patrik Ragnarsson <patrik@starkast.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
WHY are these changes introduced?
To use Go-VCR testing package for the provider, the HTTP client transport need to be changeable.
WHAT is this pull request doing?
HOW can this pull request be tested?
Together with provider changes: cloudamqp/terraform-provider-cloudamqp#257