Only run tests that require bsdtar if it is available

This commit is contained in:
Chris Roberts 2019-06-19 15:29:55 -07:00
parent 2f2d1f9cb2
commit 5e0f64d654
3 changed files with 6 additions and 2 deletions

View File

@ -41,6 +41,10 @@ RSpec.configure do |c|
c.filter_run_excluding :windows
end
if !Vagrant::Util::Which.which("bsdtar")
c.filter_run_excluding :bsdtar
end
c.after(:suite) do
FileUtils.rm_rf(VAGRANT_TEST_CWD)
end

View File

@ -10,7 +10,7 @@ require File.expand_path("../../../../base", __FILE__)
require "vagrant/util/file_checksum"
describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
describe Vagrant::Action::Builtin::BoxAdd, :skip_windows, :bsdtar do
include_context "unit"
let(:app) { lambda { |env| } }

View File

@ -320,7 +320,7 @@ describe Vagrant::Box, :skip_windows do
FileUtils.rm_rf(scratch)
end
it "should repackage the box" do
it "should repackage the box", :bsdtar do
test_file_contents = "hello, world!"
# Put a file in the box directory to verify it is packaged properly