Verify box with a string path, not pathname
This commit is contained in:
parent
79b303a1fc
commit
02cfb60387
|
@ -10,7 +10,7 @@ module Vagrant
|
|||
def call(env)
|
||||
begin
|
||||
env.ui.info "vagrant.actions.box.verify.verifying"
|
||||
VirtualBox::Appliance.new(env["box"].ovf_file)
|
||||
VirtualBox::Appliance.new(env["box"].ovf_file.to_s)
|
||||
rescue Exception
|
||||
raise Errors::BoxVerificationFailed.new
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ class VerifyBoxActionTest < Test::Unit::TestCase
|
|||
context "calling" do
|
||||
should "continue fine if verification succeeds" do
|
||||
seq = sequence("seq")
|
||||
VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file).in_sequence(seq)
|
||||
VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file.to_s).in_sequence(seq)
|
||||
@app.expects(:call).with(@env).once.in_sequence(seq)
|
||||
assert_nothing_raised {
|
||||
@instance.call(@env)
|
||||
|
@ -20,7 +20,7 @@ class VerifyBoxActionTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
should "halt chain if verification fails" do
|
||||
VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file).raises(Exception)
|
||||
VirtualBox::Appliance.expects(:new).with(@env["box"].ovf_file.to_s).raises(Exception)
|
||||
@app.expects(:call).with(@env).never
|
||||
assert_raises(Vagrant::Errors::BoxVerificationFailed) {
|
||||
@instance.call(@env)
|
||||
|
|
Loading…
Reference in New Issue