-
Notifications
You must be signed in to change notification settings - Fork 228
Conversation
After review on Monday dev call:
Thanks for building this :) |
Added a fix for the case when the destination is a directory:
Also added a fix for the case when the source is a directory and destination is a file of the same name, copying returns an error.
Added e2e test for host to VM and VM to host copying of files and symlinks. |
Rebased. |
Rebased and added e2e tests for copying directory. |
Rebased. |
e2e test failure seems to be because the VM run failed. |
@luxas and I think this looks really good from a code standpoint. I was able to replicate the CI failures locally on my first try, so I think there may be an issue with the tests, or maybe a dependency change is causing a regression. Are your tests perhaps depending on existing vm's on your host? I did rebase on
|
Rebased again. Thanks for trying to reproduce the problem. I'm not sure why I'm still not able to reproduce it. Ran many times, individually, multiple times and along with all the other tests. The test is independent and doesn't depend on any existing VM. The error seems to be related to ssh connection to the created VMs. |
Please rebase on master which now includes #581 :) |
Implement bidirectional copy from host to VM and VM to host using sftp. The copy command syntax is similar to `docker cp` with source and destination that can have VM reference name or ID separated by a filepath using ":". VM reference in copy source means to copy from VM to host and VM reference in copy destination means to copy from host to VM. File permissions and owners are also applied to the copied files. Symlinks are followed and the destination files are copied.
When source is a file and destination is a directory, append the base file name of source to the destination path, moving the source into destination directory. When source is a directory and destination is also a directory with a different name, copy the source to destination as a subdirectory. If the destination directory has a file with the same name as the source, fail to copy. Directory should not overwrite an existing file.
We've dealt with the SSH E2E test flake. I've run these e2e's on my machine several times, and I think we can safely merge this. |
This implements cp command on top of #495 .
Implements bidirectional copy from host to VM and VM to host using sftp.
The copy command syntax is similar to
docker cp
with source anddestination that can have VM reference name or ID separated by a
filepath using ":". VM reference in copy source means to copy from VM to
host and VM reference in copy destination means to copy from host to VM.
Example usage:
File permissions and owners are also applied to the copied files.
Symlinks are followed and the destination files are copied.
Fixes #419