Fix packaging. Broke due to internal changes from multivm. [closes GH-64]
This commit is contained in:
parent
4d077a1ca2
commit
5251d89241
|
@ -20,13 +20,12 @@ module Vagrant
|
||||||
def package_base
|
def package_base
|
||||||
# Packaging a base box; that is a VM not tied to a specific
|
# Packaging a base box; that is a VM not tied to a specific
|
||||||
# vagrant environment
|
# vagrant environment
|
||||||
vm = VM.find(options[:base])
|
vm = VM.find(options[:base], env)
|
||||||
if !vm
|
if !vm
|
||||||
error_and_exit(:vm_base_not_found, :name => options[:base])
|
error_and_exit(:vm_base_not_found, :name => options[:base])
|
||||||
return # for tests
|
return # for tests
|
||||||
end
|
end
|
||||||
|
|
||||||
vm.env = env
|
|
||||||
package_vm(vm)
|
package_vm(vm)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -27,15 +27,14 @@ class CommandsPackageTest < Test::Unit::TestCase
|
||||||
|
|
||||||
context "packaging base" do
|
context "packaging base" do
|
||||||
should "error and exit if no VM is found" do
|
should "error and exit if no VM is found" do
|
||||||
Vagrant::VM.expects(:find).with("foo").returns(nil)
|
Vagrant::VM.expects(:find).with("foo", @instance.env).returns(nil)
|
||||||
@instance.expects(:error_and_exit).with(:vm_base_not_found, :name => "foo").once
|
@instance.expects(:error_and_exit).with(:vm_base_not_found, :name => "foo").once
|
||||||
@instance.execute(["--base", "foo"])
|
@instance.execute(["--base", "foo"])
|
||||||
end
|
end
|
||||||
|
|
||||||
should "package the VM like any other VM" do
|
should "package the VM like any other VM" do
|
||||||
vm = mock("vm")
|
vm = mock("vm")
|
||||||
Vagrant::VM.expects(:find).with("foo").returns(vm)
|
Vagrant::VM.expects(:find).with("foo", @instance.env).returns(vm)
|
||||||
vm.expects(:env=).with(@env).once
|
|
||||||
@instance.expects(:package_vm).with(vm).once
|
@instance.expects(:package_vm).with(vm).once
|
||||||
@instance.execute(["--base", "foo"])
|
@instance.execute(["--base", "foo"])
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
||||||
s.authors = ["Mitchell Hashimoto", "John Bender"]
|
s.authors = ["Mitchell Hashimoto", "John Bender"]
|
||||||
s.date = %q{2010-05-17}
|
s.date = %q{2010-05-18}
|
||||||
s.default_executable = %q{vagrant}
|
s.default_executable = %q{vagrant}
|
||||||
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
|
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
|
||||||
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
||||||
|
|
Loading…
Reference in New Issue