Confirm symlinks are snaggled correctly#90
Merged
Merged
Conversation
Reviewer's GuideEnable and verify correct handling of symlinked binaries by extending the test framework with subdir and symlink flags, updating test-case generation logic, adding a NoSymlinks assertion, and wiring in test data and assertions to confirm no symlinks remain after snaggling. Sequence diagram for symlink handling in test case generationsequenceDiagram
participant T["testing.T"]
participant TestCases
participant Asserter
participant FileSystem
T->>TestCases: Run test with symlinked binary
TestCases->>FileSystem: Prepare test directory with symlink
TestCases->>Asserter: Assert NoSymlinks after snaggling
Asserter->>FileSystem: WalkDir to check for symlinks
Asserter->>T: Report error if symlink found
ER diagram for new symlinked test dataerDiagram
TESTDETAILS {
string Name
string Path
binaryDetails Bin
string SnagTo
string SnagAs
bool InSubdir
bool Symlink
}
TESTDATA {
string Path
}
TESTDETAILS ||--|| TESTDATA : uses
Class diagram for updated TestDetails structclassDiagram
class TestDetails {
string Name
string Path
binaryDetails Bin
string SnagTo
string SnagAs
bool InSubdir
bool Symlink
}
Class diagram for new Asserter.NoSymlinks methodclassDiagram
class Asserter {
DirectoryContents(ExpectedContents map[string]string, dir string)
NoSymlinks(dir string)
LinkedFile(path1 string, path2 string)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #90 +/- ##
==========================================
- Coverage 74.36% 73.77% -0.60%
==========================================
Files 12 12
Lines 593 610 +17
==========================================
+ Hits 441 450 +9
- Misses 108 112 +4
- Partials 44 48 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Closes #64
Summary by Sourcery
Add symlink handling tests and assertions to confirm that snaggle resolves and copies symlinked binaries correctly without leaving symlinks in the output.
New Features:
Enhancements:
Tests: