Skip to content

temp home dir to avoid issues in some environments#1773

Merged
dgageot merged 1 commit intodocker:mainfrom
krissetto:make-test-more-reliable
Feb 18, 2026
Merged

temp home dir to avoid issues in some environments#1773
dgageot merged 1 commit intodocker:mainfrom
krissetto:make-test-more-reliable

Conversation

@krissetto
Copy link
Contributor

fixes issues running the test locally when having a default agent alias

Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
@krissetto krissetto requested a review from a team as a code owner February 18, 2026 10:40
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

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

Review Summary

No issues found

The change correctly uses t.Setenv("HOME", t.TempDir()) to isolate the test from local user configuration. This is the proper Go testing idiom for:

  • Setting environment variables with automatic cleanup
  • Creating temporary directories that persist for the test duration
  • Preventing conflicts with developer-specific agent aliases

The implementation follows best practices and solves the isolation problem described in the PR.

@dgageot dgageot merged commit 7c0b51d into docker:main Feb 18, 2026
8 checks passed
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