Remove the `.unison` folder to avoid "folder is empty" error

This commit is contained in:
Mitchell Hashimoto 2010-06-22 23:54:05 -07:00
parent 03262b0a04
commit 3006fa35c3
2 changed files with 6 additions and 0 deletions

View File

@ -70,6 +70,7 @@ module Vagrant
:script => config.unison.script,
:log_file => (config.unison.log_file % sanitized_string))
ssh.exec!("sudo rm -rf ~/.unison")
ssh.exec!("sudo rm -rf #{opts[:original][:guestpath]}")
ssh.exec!("sudo echo \"#{crontab_entry}\" >> #{config.unison.crontab_entry_file}")
ssh.exec!("crontab #{config.unison.crontab_entry_file}")

View File

@ -92,6 +92,11 @@ class LinuxSystemTest < Test::Unit::TestCase
@instance.create_unison(@ssh, @options)
end
should "remove the .unison directory" do
@ssh.expects(:exec!).with("sudo rm -rf ~/.unison")
@instance.create_unison(@ssh, @options)
end
should "remove the original guestpath" do
@ssh.expects(:exec!).with("sudo rm -rf #{@options[:original][:guestpath]}")
@instance.create_unison(@ssh, @options)