8000
Skip to content

Improve cleanup of lxd-user tests to allow repeated runs#17148

Merged
tomponline merged 2 commits intocanonical:mainfrom
simondeziel:lxd-user-tests
Dec 3, 2025
Merged

Improve cleanup of lxd-user tests to allow repeated runs#17148
tomponline merged 2 commits intocanonical:mainfrom
simondeziel:lxd-user-tests

Conversation

@simondeziel
Copy link
Copy Markdown
Member
@simondeziel simondeziel commented Dec 3, 2025

Allow running those tests with LXD_REPEAT_TESTS=2 or more.

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
…er()`

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Copy link
Copy Markdown
Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the cleanup logic in the lxd-user test suite to enable reliable repeated test runs by ensuring all created resources are properly removed after test execution.

  • Adds cleanup of temporary directories (USER_TEMPDIR and TEST_DIR/lxd-user)
  • Removes trust certificates, projects, and networks created by lxd-user daemon during tests
  • Extends both test_lxd_user() and test_snap_lxd_user() functions with comprehensive cleanup steps

Comment thread test/suites/lxd_user.sh
Comment thread test/suites/lxd_user.sh
Comment thread test/suites/lxd_user.sh
Comment thread test/suites/lxd_user.sh
@simondeziel simondeziel marked this pull request as ready for review December 3, 2025 20:52
Copy link
Copy Markdown
Member
@tomponline tomponline left a comment

Choose a reason for hiding this comment

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

Ta

@tomponline tomponline merged commit 4165bef into canonical:main Dec 3, 2025
75 of 78 checks passed
@simondeziel simondeziel deleted the lxd-user-tests branch December 3, 2025 22:28
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.

3 participants

0