From 82d26f29e88f38b804cdfeee1175fd10401c7d3b Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 30 Dec 2010 21:06:21 -0600 Subject: [PATCH] Tests passing for shared folder mount changes. --- CHANGELOG.md | 4 ++++ test/vagrant/systems/linux_test.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4b66ecb6..d324c85ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.7.0.beta2 (unreleased) + + - Use numeric uid/gid in mounting shared folders to increase portability. [GH-252] + ## 0.7.0.beta (December 24, 2010) - VirtualBox 4.0 support. Support for VirtualBox 3.2 is _dropped_, since diff --git a/test/vagrant/systems/linux_test.rb b/test/vagrant/systems/linux_test.rb index dfea92d70..16b44d390 100644 --- a/test/vagrant/systems/linux_test.rb +++ b/test/vagrant/systems/linux_test.rb @@ -61,7 +61,7 @@ class LinuxSystemTest < Test::Unit::TestCase end should "execute the proper mount command" do - @ssh.expects(:exec!).with("sudo mount -t vboxsf -o uid=#{@vm.env.config.ssh.username},gid=#{@vm.env.config.ssh.username} #{@name} #{@guestpath}").returns(@success_return) + @ssh.expects(:exec!).with("sudo mount -t vboxsf -o uid=`id -u #{@vm.env.config.ssh.username}`,gid=`id -g #{@vm.env.config.ssh.username}` #{@name} #{@guestpath}").returns(@success_return) mount_folder end @@ -107,7 +107,7 @@ class LinuxSystemTest < Test::Unit::TestCase @vm.stubs(:env).returns(env) - @ssh.expects(:exec!).with("sudo mount -t vboxsf -o uid=#{uid},gid=#{gid} #{@name} #{@guestpath}").returns(@success_return) + @ssh.expects(:exec!).with("sudo mount -t vboxsf -o uid=`id -u #{uid}`,gid=`id -g #{gid}` #{@name} #{@guestpath}").returns(@success_return) mount_folder end end