Export doesn't continue chain if error occured
This commit is contained in:
parent
940693287d
commit
9a81a1f49a
|
@ -18,7 +18,7 @@ module Vagrant
|
|||
setup_temp_dir
|
||||
export
|
||||
|
||||
@app.call(env)
|
||||
@app.call(env) if !env.error?
|
||||
|
||||
cleanup
|
||||
end
|
||||
|
|
|
@ -51,6 +51,20 @@ class ExportVMActionTest < Test::Unit::TestCase
|
|||
@env.error!(:interrupt)
|
||||
@instance.call(@env)
|
||||
end
|
||||
|
||||
should "halt the chain if env error when call is reached" do
|
||||
@internal_vm.stubs(:powered_off?).returns(true)
|
||||
@instance.expects(:setup_temp_dir).once
|
||||
@instance.expects(:export).once.with() do
|
||||
@env.error!(:interrupt)
|
||||
true
|
||||
end
|
||||
|
||||
@app.expects(:call).with(@env).never
|
||||
@instance.expects(:cleanup).once
|
||||
|
||||
@instance.call(@env)
|
||||
end
|
||||
end
|
||||
|
||||
context "cleaning up" do
|
||||
|
|
Loading…
Reference in New Issue