Skip to content

usrlocalsharelima.Dir() doesn't work when called from tests #3208

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
jandubois opened this issue Feb 9, 2025 · 0 comments · May be fixed by #3401
Open

usrlocalsharelima.Dir() doesn't work when called from tests #3208

jandubois opened this issue Feb 9, 2025 · 0 comments · May be fixed by #3401

Comments

@jandubois
Copy link
Member

During tests the os.Executable is located in a temp directory, and the guestagent binary cannot be located relative to that directory.

This is not an issue right now because we don't call this function from our existing tests.

failed to find "lima-guestagent.Linux-aarch64" binary for "/var/folders/ds/jk3wz4n96d54wp16s0tg7d2r0000gn/T/go-build4137918305/b001/limatmpl.test", attempted [/var/folders/ds/jk3wz4n96d54wp16s0tg7d2r0000gn/T/go-build4137918305/b001/lima-guestagent.Linux-aarch64 /var/folders/ds/jk3wz4n96d54wp16s0tg7d2r0000gn/T/go-build4137918305/share/lima/lima-guestagent.Linux-aarch64]
Konikz pushed a commit to Konikz/lima that referenced this issue Apr 15, 2025
lima-vm#3208)

This commit adds a test that verifies usrlocalsharelima.Dir() works correctly when called from tests, where os.Executable is located in a temp directory. The test creates dummy guestagent binaries in both expected locations and verifies that Dir() can find them.

Signed-off-by: Konikz <[email protected]>
Konikz pushed a commit to Konikz/lima that referenced this issue Apr 15, 2025
This commit removes all plugin-related files that were accidentally included in the PR. These files are not related to the fix for issue lima-vm#3208.

Signed-off-by: Konikz <[email protected]>
Konikz pushed a commit to Konikz/lima that referenced this issue Apr 15, 2025
lima-vm#3208)

This commit adds a test that verifies usrlocalsharelima.Dir() works correctly when called from tests, where os.Executable is located in a temp directory. The test creates dummy guestagent binaries in both expected locations and verifies that Dir() can find them.

Signed-off-by: Konikz <[email protected]>
Konikz pushed a commit to Konikz/lima that referenced this issue Apr 15, 2025
This commit removes all plugin-related files that were accidentally included in the PR. These files are not related to the fix for issue lima-vm#3208.

Signed-off-by: Konikz <[email protected]>
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 a pull request may close this issue.

1 participant