`vagrant up` can be used the same as `vagrant resume` [closes GH-134]
This commit is contained in:
parent
1cbc931a6d
commit
cf32abb210
|
@ -1,5 +1,7 @@
|
||||||
## 0.5.2 (unreleased)
|
## 0.5.2 (unreleased)
|
||||||
|
|
||||||
|
- `vagrant up` can be used as a way to resume the VM as well (same as
|
||||||
|
`vagrant resume`). [GH-134]
|
||||||
- Sudo uses "-E" flag to preserve environment for chef provisioners.
|
- Sudo uses "-E" flag to preserve environment for chef provisioners.
|
||||||
This fixes issues with CentOS. [GH-133]
|
This fixes issues with CentOS. [GH-133]
|
||||||
- Added "IdentitiesOnly yes" to options when `vagrant ssh` is run to
|
- Added "IdentitiesOnly yes" to options when `vagrant ssh` is run to
|
||||||
|
|
|
@ -103,6 +103,7 @@ module Vagrant
|
||||||
|
|
||||||
def start
|
def start
|
||||||
return if @vm.running?
|
return if @vm.running?
|
||||||
|
return resume if @vm.saved?
|
||||||
|
|
||||||
env.actions.run(:start)
|
env.actions.run(:start)
|
||||||
end
|
end
|
||||||
|
|
|
@ -203,6 +203,7 @@ class VMTest < Test::Unit::TestCase
|
||||||
context "starting" do
|
context "starting" do
|
||||||
setup do
|
setup do
|
||||||
@mock_vm.stubs(:running?).returns(false)
|
@mock_vm.stubs(:running?).returns(false)
|
||||||
|
@mock_vm.stubs(:saved?).returns(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
should "not do anything if the VM is already running" do
|
should "not do anything if the VM is already running" do
|
||||||
|
@ -211,6 +212,13 @@ class VMTest < Test::Unit::TestCase
|
||||||
@vm.start
|
@vm.start
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "execute the resume action if saved" do
|
||||||
|
@mock_vm.expects(:saved?).returns(true)
|
||||||
|
@vm.expects(:resume).once
|
||||||
|
@vm.env.actions.expects(:run).with(:start).never
|
||||||
|
@vm.start
|
||||||
|
end
|
||||||
|
|
||||||
should "execute the start action" do
|
should "execute the start action" do
|
||||||
@vm.env.actions.expects(:run).with(:start).once
|
@vm.env.actions.expects(:run).with(:start).once
|
||||||
@vm.start
|
@vm.start
|
||||||
|
|
Loading…
Reference in New Issue