diff --git a/plugins/guests/smartos/cap/rsync.rb b/plugins/guests/smartos/cap/rsync.rb index f8ad11bd1..0217c4dcc 100644 --- a/plugins/guests/smartos/cap/rsync.rb +++ b/plugins/guests/smartos/cap/rsync.rb @@ -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 diff --git a/plugins/guests/smartos/plugin.rb b/plugins/guests/smartos/plugin.rb index b691609ce..f99f7e498 100644 --- a/plugins/guests/smartos/plugin.rb +++ b/plugins/guests/smartos/plugin.rb @@ -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 diff --git a/test/unit/plugins/guests/smartos/cap/rsync_test.rb b/test/unit/plugins/guests/smartos/cap/rsync_test.rb index d51910b7c..d95ae49a7 100644 --- a/test/unit/plugins/guests/smartos/cap/rsync_test.rb +++ b/test/unit/plugins/guests/smartos/cap/rsync_test.rb @@ -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