Skip to content

ci: run sweepers before/after tests and fix deletion order - #154

Open
urscale wants to merge 2 commits into
masterfrom
urs/improve-cleanup
Open

ci: run sweepers before/after tests and fix deletion order#154
urscale wants to merge 2 commits into
masterfrom
urs/improve-cleanup

Conversation

@urscale

@urscale urscale commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The acceptance-test suite sometimes leaves cloud resources behind
(e.g. servers, routers, volumes) when a run timed out or was cancelled.
Subsequent runs then fail because the orphaned resources hit limits
or blocked creation of new dependencies.

Changes:

  • Add a pre-test sweep step to clean up leftovers from earlier runs.
  • Add a post-test sweep step (always()) so leaks from the current run
    are removed even if the tests fail or timeout.
  • Declare missing Sweeper Dependencies so Terraform destroys in the
    correct order: servers before floating IPs, volumes, server groups,
    load balancers, and custom images; routers before networks.

This mirrors the Makefile sweep target that already existed but was
never invoked in CI.

Comment thread cloudscale/resource_cloudscale_floating_ip_test.go Outdated
Floating IPs can also be attached to loadbalancers

Co-authored-by: Michael Weibel <307427+mweibel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants