From 1380bc6ae7b7a82b06ffd3afd65b3597180d4dd7 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 12 Jan 2012 23:52:25 -0800 Subject: [PATCH] Basic package acceptance tests --- test/acceptance/package_test.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/acceptance/package_test.rb diff --git a/test/acceptance/package_test.rb b/test/acceptance/package_test.rb new file mode 100644 index 000000000..3ba005b74 --- /dev/null +++ b/test/acceptance/package_test.rb @@ -0,0 +1,23 @@ +require File.expand_path("../base", __FILE__) +require "acceptance/support/shared/command_examples" + +describe "vagrant package" do + 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" + def initialize_valid_environment + require_box("default") + + assert_execute("vagrant", "box", "add", "base", box_path("default")) + assert_execute("vagrant", "init") + end + + it "can package a running virtual machine" do + initialize_valid_environment + + assert_execute("vagrant", "up") + assert_execute("vagrant", "package") + environment.workdir.join("package.box").should be_file + end +end