guests/omnios: Add rsync_install functionality
This commit is contained in:
parent
c441732c59
commit
d7bc7c2267
|
@ -0,0 +1,11 @@
|
|||
module VagrantPlugins
|
||||
module GuestOmniOS
|
||||
module Cap
|
||||
class RSync
|
||||
def self.rsync_install(machine)
|
||||
machine.communicate.sudo("pkg install rsync")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,29 @@
|
|||
require_relative "../../../../base"
|
||||
|
||||
describe "VagrantPlugins::GuestOmniOS::Cap:RSync" do
|
||||
let(:caps) do
|
||||
VagrantPlugins::GuestOmniOS::Plugin
|
||||
.components
|
||||
.guest_capabilities[:omnios]
|
||||
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 ".rsync_install" do
|
||||
let(:cap) { caps.get(:rsync_install) }
|
||||
|
||||
it "installs rsync" do
|
||||
cap.rsync_install(machine)
|
||||
expect(comm.received_commands[0]).to match(/pkg install rsync/)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue