Skip to content

Fix test debris from trustedroot integration tests - #1

Open
Solver-Team wants to merge 14 commits into
trunkfrom
fix-trustedroot-test-debris
Open

Solver-Team wants to merge 14 commits into
trunkfrom
fix-trustedroot-test-debris

Conversation

@Solver-Team

@Solver-Team Solver-Team commented Mar 5, 2025 •

Copy link
Copy Markdown
Owner

The trustedroot integration tests were leaving TUF repository cache files in the working directory. This PR fixes the issue by:

  • Adding a temporary directory mechanism for TUF cache during tests
  • Using a shared testCacheDir variable to manage the temp directory
  • Creating temp directories only during test runs (when GO_INTEGRATION_TEST=1)
  • Adding a CleanupTestCache function to properly remove the temp directory
  • Updating tests to use proper cleanup through deferred functions

The changes ensure that no debris files are left behind after running the tests.

Original issue: cli#10462

Created with Solver

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.

4 participants