Resolve temp dir to real path in skills and installer unit tests#3928
Merged
Resolve temp dir to real path in skills and installer unit tests#3928
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3928 +/- ##
==========================================
+ Coverage 67.63% 67.69% +0.06%
==========================================
Files 438 438
Lines 44108 44108
==========================================
+ Hits 29833 29860 +27
+ Misses 11939 11912 -27
Partials 2336 2336 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JAORMX
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve temp dir to real path in skills tests
The edits make tests use the resolved temporary directory path (no symlinks) instead of whatever t.TempDir() returns.
pkg/skills/installer_test.got.TempDir()withfilepath.EvalSymlinks(t.TempDir())so targetDir is under the real path.pkg/skills/skillsvc/skillsvc_test.gotempDir(t): returnsfilepath.EvalSymlinks(t.TempDir()), marked witht.Helper().tempDir(t)(orfilepath.Join(tempDir(t), ...)) instead oft.TempDir()in:Why this helps
On macOS, the default temp dir often goes through a symlink (e.g.
/var/folders/...→/private/var/folders/...), therefore,installer_testandskillssvc_testfailing on macOS with:If tests pass a symlinked path but the code under test (or libraries like the OCI store) resolve paths to their real location, you can get:
Using
filepath.EvalSymlinks(t.TempDir())(and the sharedtempDir(t)helper) makes tests use the same canonical path the rest of the code sees, which stabilizes these tests on systems where the temp dir is a symlink.