Make fixtures part of tests#2814
Merged
pierreprinetti merged 1 commit intogophercloud:v1from Oct 17, 2023
Merged
Conversation
Member
|
Can you please mention the corresponding commit on the main branch, in the PR description and possibly in the commit itself? |
By renaming the fixtures to fixtures_test, we mark them as test, and no longer part of the public API.
Some files were left out as they were included in other tests:
$ grep "/testing" -R openstack | cut -d " " -f 2 | sort | uniq
"github.com/gophercloud/gophercloud/openstack/common/extensions/testing"
"github.com/gophercloud/gophercloud/openstack/identity/v3/tokens/testing"
"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/testing"
"github.com/gophercloud/gophercloud/openstack/networking/v2/networks/testing"
"github.com/gophercloud/gophercloud/openstack/networking/v2/ports/testing"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/accounts/testing"
"github.com/gophercloud/gophercloud/openstack/objectstorage/v1/containers/testing"
This should prevent go-apidiff from complaining when modifying fixtures.
This commit mirrors 7f1d075 that merged
in master.
77abd8f to
c71fc9d
Compare
pierreprinetti
approved these changes
Oct 17, 2023
Member
pierreprinetti
left a comment
There was a problem hiding this comment.
This is technically a major change we're pushing to the stable branch.
The reason for this is: we're removing most test fixtures from the public API surface. Many changes that should have been "patch" or "minor" fell into the "major" bucket because they changed the test fixtures while adding coverage; and this is bad.
I expect disruption from this change. However, I believe that is necessary and that test code shouldn't have been part of the public API in the first place. Sorry about that.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
By renaming the fixtures to fixtures_test, we mark them as test, and no longer part of the public API.
Some files were left out as they were included in other tests:
This should prevent go-apidiff from complaining when modifying fixtures.
This commit mirrors 7f1d075 that merged in master.