Only mount and do unison setup in the absense of error environments
This commit is contained in:
parent
73a3723608
commit
ae750288ed
|
@ -15,8 +15,12 @@ module Vagrant
|
||||||
|
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
|
|
||||||
mount_shared_folders
|
if !env.error?
|
||||||
setup_unison
|
# Only mount and setup shared folders in the absense of an
|
||||||
|
# error
|
||||||
|
mount_shared_folders
|
||||||
|
setup_unison
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# This method returns an actual list of VirtualBox shared
|
# This method returns an actual list of VirtualBox shared
|
||||||
|
|
|
@ -46,6 +46,19 @@ class ShareFoldersVMActionTest < Test::Unit::TestCase
|
||||||
|
|
||||||
@instance.call(@env)
|
@instance.call(@env)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "run only the metadata actions if erroneous environment" do
|
||||||
|
@env.error!(:foo)
|
||||||
|
|
||||||
|
before_seq = sequence("before")
|
||||||
|
@instance.expects(:clear_shared_folders).once.in_sequence(before_seq)
|
||||||
|
@instance.expects(:create_metadata).once.in_sequence(before_seq)
|
||||||
|
@app.expects(:call).with(@env).in_sequence(before_seq)
|
||||||
|
@instance.expects(:mount_shared_folders).never
|
||||||
|
@instance.expects(:setup_unison).never
|
||||||
|
|
||||||
|
@instance.call(@env)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "collecting shared folders" do
|
context "collecting shared folders" do
|
||||||
|
|
Loading…
Reference in New Issue