Push a failing acceptance test as a reminder of a missing feature
This commit is contained in:
parent
1380bc6ae7
commit
52a464a62c
|
@ -3,7 +3,6 @@ require "acceptance/support/shared/command_examples"
|
||||||
|
|
||||||
describe "vagrant package" do
|
describe "vagrant package" do
|
||||||
include_context "acceptance"
|
include_context "acceptance"
|
||||||
it_behaves_like "a command that requires a Vagrantfile", ["vagrant", "package"]
|
|
||||||
|
|
||||||
# This creates an initial environment that is ready for a "vagrant up"
|
# This creates an initial environment that is ready for a "vagrant up"
|
||||||
def initialize_valid_environment
|
def initialize_valid_environment
|
||||||
|
@ -20,4 +19,28 @@ describe "vagrant package" do
|
||||||
assert_execute("vagrant", "package")
|
assert_execute("vagrant", "package")
|
||||||
environment.workdir.join("package.box").should be_file
|
environment.workdir.join("package.box").should be_file
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "can package a `base` VM directly from VirtualBox" do
|
||||||
|
initialize_valid_environment
|
||||||
|
|
||||||
|
# Use a custom Vagrantfile that sets the VM name to `foo`
|
||||||
|
environment.workdir.join("Vagrantfile").open("w+") do |f|
|
||||||
|
f.write(<<-vf)
|
||||||
|
Vagrant::Config.run do |config|
|
||||||
|
config.vm.box = "base"
|
||||||
|
config.vm.customize ["modifyvm", :id, "--name", "foo"]
|
||||||
|
end
|
||||||
|
vf
|
||||||
|
end
|
||||||
|
|
||||||
|
# Bring up the VM
|
||||||
|
assert_execute("vagrant", "up")
|
||||||
|
|
||||||
|
# Remove the Vagrantfile so it doesn't use that
|
||||||
|
environment.workdir.join("Vagrantfile").unlink
|
||||||
|
|
||||||
|
# Now package the base VM
|
||||||
|
assert_execute("vagrant", "package", "--base", "foo")
|
||||||
|
environment.workdir.join("package.box").should be_file
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue