Run the destroy sequence instead of the specific action for handling SIGINT in import
This commit is contained in:
parent
cb730c3410
commit
bba97a28c7
|
@ -25,7 +25,7 @@ module Vagrant
|
||||||
@app.call(env) if !env.error?
|
@app.call(env) if !env.error?
|
||||||
|
|
||||||
# Interrupted, destroy the VM
|
# Interrupted, destroy the VM
|
||||||
env["actions"].run(Destroy) if env.interrupted?
|
env["actions"].run(:destroy) if env.interrupted?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -43,7 +43,7 @@ class ImportVMActionTest < Test::Unit::TestCase
|
||||||
assert_equal @env, env
|
assert_equal @env, env
|
||||||
@env.error!(:interrupt)
|
@env.error!(:interrupt)
|
||||||
end
|
end
|
||||||
@env.env.actions.expects(:run).with(Vagrant::Action::VM::Destroy).once
|
@env.env.actions.expects(:run).with(:destroy).once
|
||||||
|
|
||||||
@instance.call(@env)
|
@instance.call(@env)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue