Skip to content

Add test for workdir being a symlink to another folder #11927

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

Add test for workdir being a symlink to another folder

Should only pass after #11910 is merged in.
Thanks @avagin for help here!

#11910 (comment)

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11915 from ekzhang:add-test-symlink-workdir a8cf826

@copybara-service copybara-service bot added the exported Issue was exported automatically label Jul 15, 2025
@copybara-service copybara-service bot force-pushed the test/cl783271203 branch 4 times, most recently from defcb38 to 0623bab Compare July 15, 2025 17:06
Should only pass after #11910 is merged in.
Thanks @avagin for help here!

#11910 (comment)

FUTURE_COPYBARA_INTEGRATE_REVIEW=#11915 from ekzhang:add-test-symlink-workdir a8cf826
PiperOrigin-RevId: 783271203
@avagin
Copy link
Collaborator

avagin commented Jul 15, 2025

This test fails on buildkite:

--- FAIL: TestSymlinkWorkingDirectory (0.62s)
    integration_test.go:1059: working directory mismatch, want: "/test/symlink-to-dir\n", got: "/test/actual-dir\n"
    integration_test.go:1066: docker run failed: Error response from daemon: Conflict. The container name "/TestSymlinkWorkingDirectory-V5YVDQCPRWDVTGWTTEVQPH5ZNNR4PC66" is already in use by container "ef188b464367eccff250f2c7b49eee4d34492749b0f352fe78eaaf60841686a4". You have to remove (or rename) that container to be able to reuse that name.
FAIL


// Additional test: verify we can actually use the working directory
// by creating a file in it
_, err = d.Run(ctx, opts, "sh", "-c", "echo 'test content' > testfile && cat testfile")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can combine this command with the previous one to avoid executing the same container twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exported Issue was exported automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants