Skip to content

Commit

Permalink
Do not copy symlinks to VM for integration tests
Browse files Browse the repository at this point in the history
This change updates the rsync command for the Vagrantfile to not copy
symlinks to the underlying VM. This is due to the fact that `dep` does
not prune symlinks, and a broken symlink that is included by a vendored
dependency breaks the default `rsync` command. See
golang/dep#1625 for more context.
  • Loading branch information
jfmyers9 committed Apr 2, 2018
1 parent b76be3d commit 21dc9ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ Vagrant.configure('2') do |config|

agent_dir = '/home/vagrant/go/src/github.com/cloudfoundry/bosh-agent'

config.vm.synced_folder '.', agent_dir, type: "rsync"
# We need to override the rsync args to exlucde "--copy-links".
# This is due to the fact that `dep` does not prune symlinks from the vendor directory.
# A vendored dependency has a broken symlink for test, which breaks `rsync`.
# See https://github.com/golang/dep/issues/1625 for more context
config.vm.synced_folder '.', agent_dir, type: "rsync",
rsync__args: ["--verbose", "--archive", "--delete", "-z"]

# config.vm.synced_folder Dir.pwd, '/vagrant', disabled: true
config.vm.provision :shell, inline: "mkdir -p /vagrant && chmod 777 /vagrant"
Expand Down

0 comments on commit 21dc9ce

Please sign in to comment.