Mitchell Hashimoto 8c7ab333a0 Squash the f-docker-hostmachine branch.
Initial work

commands/up: make sure all names to with_target_vms are strings

providers/docker: create a docker host VM if needed

providers/docker: executor abstraction for driver to eventually support remote

providers/docker: vagrant executor

providers/docker: support creating the machine

providers/docker: status works if host VM is gone

providers/docker: use start fence to get real docker output

core: Call preserves stack ordering

core: support Message post option

providers/docker: Guard some features with HasSSH checks

providers/docker: much better messaging around create/destroy

providers/docker: output the container ID on create

providers/docker: copy the hostmachine Vagrantfile to the data dir

providers/docker: should make host machine before any up action

providers/docker: HandleBox before the host machine

providers/virtualbox: functional_vboxsf to disable vboxsf

providers/virtualbox: synced folder usable method should take 2 args

providers/docker: default machine name to :default
2014-04-21 13:54:33 -07:00

44 lines
1009 B
Ruby

require_relative "../../../base"
require "vagrant/util/platform"
require Vagrant.source_root.join("plugins/providers/docker/config")
describe VagrantPlugins::DockerProvider::Config do
let(:machine) { double("machine") }
def assert_invalid
errors = subject.validate(machine)
if !errors.values.any? { |v| !v.empty? }
raise "No errors: #{errors.inspect}"
end
end
def assert_valid
errors = subject.validate(machine)
if !errors.values.all? { |v| v.empty? }
raise "Errors: #{errors.inspect}"
end
end
describe "defaults" do
before { subject.finalize! }
its(:cmd) { should eq([]) }
its(:image) { should be_nil }
its(:privileged) { should be_false }
its(:vagrant_machine) { should be_nil }
its(:vagrant_vagrantfile) { should be_nil }
end
before do
# By default lets be Linux for validations
Vagrant::Util::Platform.stub(linux: true)
end
it "should be valid by default" do
subject.finalize!
assert_valid
end
end