Resolve confusion around SmartOS rsync_pre
rsync should *always* be pre-installed in SmartOS (global and local zones), as it's part of the kernel. Previous commits incorrectly attributed #rsync_install to running rsync, rather than to installing the rsync command.
This commit is contained in:
parent
330642fa42
commit
f36d372b32
|
@ -6,7 +6,7 @@ module VagrantPlugins
|
|||
machine.communicate.test("which rsync")
|
||||
end
|
||||
|
||||
def self.rsync_install(machine, folder_opts)
|
||||
def self.rsync_pre(machine, folder_opts)
|
||||
username = machine.ssh_info[:username]
|
||||
sudo = machine.config.smartos.suexec_cmd
|
||||
|
||||
|
@ -15,10 +15,6 @@ module VagrantPlugins
|
|||
comm.execute("#{sudo} chown -R #{username} '#{folder_opts[:guestpath]}'")
|
||||
end
|
||||
end
|
||||
|
||||
def self.rsync_pre(machine, folder_opts)
|
||||
rsync_install(machine, folder_opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,11 +41,6 @@ module VagrantPlugins
|
|||
Cap::RSync
|
||||
end
|
||||
|
||||
guest_capability("smartos", "rsync_install") do
|
||||
require_relative "cap/rsync"
|
||||
Cap::RSync
|
||||
end
|
||||
|
||||
guest_capability("smartos", "rsync_pre") do
|
||||
require_relative "cap/rsync"
|
||||
Cap::RSync
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require File.expand_path("../../../../../base", __FILE__)
|
||||
|
||||
describe "VagrantPlugins::VagrantPlugins::Cap::Rsync" do
|
||||
let(:plugin) { VagrantPlugins::GuestSmartos::Plugin.components.guest_capabilities[:smartos].get(:rsync_install) }
|
||||
let(:plugin) { VagrantPlugins::GuestSmartos::Plugin.components.guest_capabilities[:smartos].get(:rsync_pre) }
|
||||
let(:machine) { double("machine") }
|
||||
let(:config) { double("config", smartos: VagrantPlugins::GuestSmartos::Config.new) }
|
||||
let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
|
||||
|
@ -31,7 +31,7 @@ describe "VagrantPlugins::VagrantPlugins::Cap::Rsync" do
|
|||
end
|
||||
end
|
||||
|
||||
describe ".rsync_install" do
|
||||
describe ".rsync_pre" do
|
||||
let(:username) { "some_user" }
|
||||
|
||||
before do
|
||||
|
@ -40,12 +40,12 @@ describe "VagrantPlugins::VagrantPlugins::Cap::Rsync" do
|
|||
|
||||
it "creates a local directory" do
|
||||
communicator.expect_command(%Q(pfexec mkdir -p '/mountpoint'))
|
||||
plugin.rsync_install(machine, {guestpath: '/mountpoint'})
|
||||
plugin.rsync_pre(machine, {guestpath: '/mountpoint'})
|
||||
end
|
||||
|
||||
it "chowns local directory to ssh user" do
|
||||
communicator.expect_command(%Q(pfexec chown -R #{username} '/mountpoint'))
|
||||
plugin.rsync_install(machine, {guestpath: '/mountpoint'})
|
||||
plugin.rsync_pre(machine, {guestpath: '/mountpoint'})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue