2015-04-20 21:56:26 +00:00
|
|
|
# Copyright (c) 2015 VMware, Inc. All Rights Reserved.
|
|
|
|
|
2016-06-05 20:55:04 +00:00
|
|
|
require_relative "../../../../base"
|
2015-04-20 21:56:26 +00:00
|
|
|
|
2016-06-05 20:55:04 +00:00
|
|
|
describe "VagrantPlugins::GuestPhoton::Cap:Docker" do
|
|
|
|
let(:caps) do
|
|
|
|
VagrantPlugins::GuestPhoton::Plugin
|
|
|
|
.components
|
|
|
|
.guest_capabilities[:photon]
|
2015-04-20 21:56:26 +00:00
|
|
|
end
|
2016-06-05 20:55:04 +00:00
|
|
|
|
2015-04-20 21:56:26 +00:00
|
|
|
let(:machine) { double("machine") }
|
2016-06-05 20:55:04 +00:00
|
|
|
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
2015-04-20 21:56:26 +00:00
|
|
|
|
|
|
|
before do
|
2016-06-05 20:55:04 +00:00
|
|
|
allow(machine).to receive(:communicate).and_return(comm)
|
2015-04-20 21:56:26 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
after do
|
2016-06-05 20:55:04 +00:00
|
|
|
comm.verify_expectations!
|
2015-04-20 21:56:26 +00:00
|
|
|
end
|
|
|
|
|
2016-06-05 20:55:04 +00:00
|
|
|
describe ".docker_daemon_running" do
|
|
|
|
let(:cap) { caps.get(:docker_daemon_running) }
|
|
|
|
|
|
|
|
it "installs rsync" do
|
|
|
|
comm.expect_command("test -S /run/docker.sock")
|
|
|
|
cap.docker_daemon_running(machine)
|
|
|
|
end
|
2015-04-20 21:56:26 +00:00
|
|
|
end
|
|
|
|
end
|