Repository navigation
fix(sandbox): use tarball upload to preserve symlinks #1079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,3 +244,11 @@ func TestSanitizeDownload_EmptyDir(t *testing.T) { | |
| err := sanitizeDownload(dir) | ||
| assert.NoError(t, err) | ||
| } | ||
|
|
||
| func TestUploadDir_OpenshellNotInPath(t *testing.T) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [low] test-adequacy TestUploadDir_OpenshellNotInPath only exercises the error path. The happy path (tarball creation with symlink preservation) is not unit-tested. Manual live-sandbox verification was performed per the PR description. Suggested fix: Add a unit test that creates a directory with a symlink, runs the tar step in isolation, and inspects the archive to confirm symlinks are preserved. |
||
| dir := t.TempDir() | ||
| t.Setenv("PATH", "") | ||
|
|
||
| err := UploadDir("test-sandbox", dir, "/tmp/workspace/repo") | ||
| assert.Error(t, err) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[info] style
extractCmd is built with fmt.Sprintf without shell-escaping remotePath or remoteTar. Safe in practice since values are internally constructed, consistent with all other Exec() call sites.