-
Notifications
You must be signed in to change notification settings - Fork 47
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
test: Fabric Connections test sweeper #720
Conversation
thogarty
commented
Jul 3, 2024
•
edited
Loading
edited
- Add test sweeper for fabric connections
- Modify internal/sweep package with constants, list var, and methods to support test sweeping for fabric
- Add config for fabric test client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sweeper isn't getting called in CI because the GitHub Actions workflow is currently set up to only look for sweepers in the equinix directory. You can update the Fabric acctest workflow to find sweepers in both the old and new locations by copying the command sweeper step of the Metal acctest workflow: https://github.com/equinix/terraform-provider-equinix/blob/main/.github/workflows/acctest.yml#L115-L124
@ctreatma , it's been updated. I also changed the filter from some type of sweeper suffix to all fabric sweepers because they have been made to search for any resource that matches fabric suffixes. We just run it with different users to ensure all our created resources are swept properly. |
e7c6aec
to
fdc8c22
Compare
@@ -25,6 +27,7 @@ func TestMain(m *testing.M) { | |||
func addTestSweepers() { | |||
connection.AddTestSweeper() | |||
device.AddTestSweeper() | |||
fabric_connection.AddTestSweeper() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not relevant for this PR or even for the Fabric team but the existing Metal sweepers in this file should all be renamed to metal_<resource>
.
I was wondering why CI was still not running the new sweeper for this PR and then I remembered that the acceptance test workflow is configured with the I ran the workflow manually and confirmed that the sweeper is now being run in CI: https://github.com/equinix/terraform-provider-equinix/actions/runs/9959400532 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workflow and sweeper wiring looks good to me, but someone on the Fabric team should validate that the sweeper job did what it was expected to do.
fdc8c22
to
b871b6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is included in version 2.3.0 🎉 |