Only mount and do unison setup in the absense of error environments
This commit is contained in:
parent
73a3723608
commit
ae750288ed
|
@ -15,9 +15,13 @@ module Vagrant
|
|||
|
||||
@app.call(env)
|
||||
|
||||
if !env.error?
|
||||
# Only mount and setup shared folders in the absense of an
|
||||
# error
|
||||
mount_shared_folders
|
||||
setup_unison
|
||||
end
|
||||
end
|
||||
|
||||
# This method returns an actual list of VirtualBox shared
|
||||
# folders to create and their proper path.
|
||||
|
|
|
@ -46,6 +46,19 @@ class ShareFoldersVMActionTest < Test::Unit::TestCase
|
|||
|
||||
@instance.call(@env)
|
||||
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
|
||||
|
||||
context "collecting shared folders" do
|
||||
|
|
Loading…
Reference in New Issue