From 96ea715e30391c46beefa0b48a45dccfe02391de Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 29 Jul 2010 20:26:02 -0700 Subject: [PATCH] Fixed `vagrant resume` to properly resume a suspend VM [closes GH-122] --- CHANGELOG.md | 1 + lib/vagrant/action/vm/resume.rb | 2 +- test/vagrant/action/vm/resume_test.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c426e7e..9ec695ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.5.1 (unreleased) + - Fixed `vagrant resume` to properly resume a suspended VM. [GH-122] - Fixed `halt`, `destroy`, `reload` to where they failed if the VM was in a saved state. [GH-123] - Added `config.chef.recipe_url` which allows you to specify a URL to diff --git a/lib/vagrant/action/vm/resume.rb b/lib/vagrant/action/vm/resume.rb index 97533c011..9add4fef8 100644 --- a/lib/vagrant/action/vm/resume.rb +++ b/lib/vagrant/action/vm/resume.rb @@ -9,7 +9,7 @@ module Vagrant def call(env) if env["vm"].vm.saved? env.logger.info "Resuming suspended VM..." - env["actions"].run(:start) + env["actions"].run(Boot) end @app.call(env) diff --git a/test/vagrant/action/vm/resume_test.rb b/test/vagrant/action/vm/resume_test.rb index b57046310..942628d77 100644 --- a/test/vagrant/action/vm/resume_test.rb +++ b/test/vagrant/action/vm/resume_test.rb @@ -19,7 +19,7 @@ class ResumeVMActionTest < Test::Unit::TestCase @internal_vm.expects(:saved?).returns(true) seq = sequence("seq") - @env.env.actions.expects(:run).with(:start).once.in_sequence(seq) + @env.env.actions.expects(:run).with(Vagrant::Action::VM::Boot).once.in_sequence(seq) @app.expects(:call).with(@env).once.in_sequence(seq) @instance.call(@env) end