Run the destroy sequence instead of the specific action for handling SIGINT in import

This commit is contained in:
Mitchell Hashimoto 2010-07-18 08:54:24 -07:00
parent cb730c3410
commit bba97a28c7
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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