guests/atomic: Add tests for docker capability

This commit adds missing test coverage for the Docker capability on
atomic guests.
This commit is contained in:
Seth Vargo 2016-05-30 22:48:16 -04:00
parent 4f0c3474f2
commit 50690dab12
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
require_relative "../../../../base"
describe "VagrantPlugins::GuestAtomic::Cap::ChangeHostName" do
let(:described_class) do
VagrantPlugins::GuestAtomic::Plugin
.components
.guest_capabilities[:atomic]
.get(:docker_daemon_running)
end
let(:machine) { double("machine") }
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
before do
allow(machine).to receive(:communicate).and_return(comm)
end
after do
comm.verify_expectations!
end
describe ".docker_daemon_running" do
it "checks /run/docker/sock" do
described_class.docker_daemon_running(machine)
expect(comm.received_commands[0]).to eq("test -S /run/docker.sock")
end
end
end