vagrant/test/unit/plugins/guests/photon/cap/docker_test.rb

32 lines
737 B
Ruby
Raw Normal View History

# Copyright (c) 2015 VMware, Inc. All Rights Reserved.
2016-06-05 20:55:04 +00:00
require_relative "../../../../base"
2016-06-05 20:55:04 +00:00
describe "VagrantPlugins::GuestPhoton::Cap:Docker" do
let(:caps) do
VagrantPlugins::GuestPhoton::Plugin
.components
.guest_capabilities[:photon]
end
2016-06-05 20:55:04 +00:00
let(:machine) { double("machine") }
2016-06-05 20:55:04 +00:00
let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
before do
2016-06-05 20:55:04 +00:00
allow(machine).to receive(:communicate).and_return(comm)
end
after do
2016-06-05 20:55:04 +00:00
comm.verify_expectations!
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
end
end