Skip to content

Make fixtures part of tests#2811

Merged
pierreprinetti merged 1 commit intogophercloud:masterfrom
shiftstack:fixtures-internal
Oct 16, 2023
Merged

Make fixtures part of tests#2811
pierreprinetti merged 1 commit intogophercloud:masterfrom
shiftstack:fixtures-internal

Conversation

@mandre
Copy link
Copy Markdown
Contributor

@mandre mandre commented Oct 13, 2023

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/baremetalintrospection/v1/introspection/testing"
"github.com/gophercloud/gophercloud/openstack/baremetal/inventory/testing"
"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.

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/baremetalintrospection/v1/introspection/testing"
    "github.com/gophercloud/gophercloud/openstack/baremetal/inventory/testing"
    "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.
@github-actions github-actions bot added the semver:major Breaking change label Oct 13, 2023
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 77.441%. remained the same when pulling 7f1d075 on shiftstack:fixtures-internal into d00e5c5 on gophercloud:master.

@pierreprinetti
Copy link
Copy Markdown
Member

LGTM in principle; let's see what the CI thinks of that.
Thank you!

Copy link
Copy Markdown
Member

@pierreprinetti pierreprinetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Baremetal fails in the deployment phase

@pierreprinetti pierreprinetti merged commit 9c3ed38 into gophercloud:master Oct 16, 2023
@pierreprinetti pierreprinetti deleted the fixtures-internal branch October 16, 2023 07:49
@mandre mandre added the backport-v1 This PR will be backported to v1 label Oct 16, 2023
@github-actions
Copy link
Copy Markdown

Labels semver-major or semver-unknown can not trigger backports.
The PR has to be labeled semver-patch or semver-minor.

mandre added a commit to shiftstack/gophercloud that referenced this pull request Mar 22, 2024
The PR removing the code for CDN [1] merged around the same time the
fixtures were modified to no longer be part of the public API [2],
causing these files to stay in the tree.

This commit cleans up files that shouldn't be here.

[1] gophercloud#2809
[2] gophercloud#2811
@mandre mandre mentioned this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v1 This PR will be backported to v1 semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants