Sha256: c8b32a70a252bb688d9f0445ba6071e9c61002c150e6b8cf08f7fec58d20a889

Contents?: true

Size: 1.09 KB

Versions: 14

Compression:

Stored size: 1.09 KB

Contents

require_relative "../../../../base"

describe "VagrantPlugins::VagrantPlugins::Cap::MountNFS" do
  let(:plugin) { VagrantPlugins::GuestSmartos::Plugin.components.guest_capabilities[:smartos].get(:mount_nfs_folder) }
  let(:machine) { double("machine") }
  let(:config) { double("config", smartos: VagrantPlugins::GuestSmartos::Config.new) }
  let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) }

  before do
    machine.stub(:communicate).and_return(communicator)
    machine.stub(:config).and_return(config)
  end

  after do
    communicator.verify_expectations!
  end

  describe ".mount_nfs_folder" do
    it "creates the directory mount point" do
      communicator.expect_command(%Q(pfexec mkdir -p /mountpoint))
      plugin.mount_nfs_folder(machine, '1.1.1.1', {'nfs' => {guestpath: '/mountpoint'}})
    end

    it "mounts the NFS share" do
      communicator.expect_command(%Q(pfexec /usr/sbin/mount -F nfs '1.1.1.1:/some/share' '/mountpoint'))
      plugin.mount_nfs_folder(machine, '1.1.1.1', {'nfs' => {guestpath: '/mountpoint', hostpath: '/some/share'}})
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-unbundled-1.9.5.1 test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-unbundled-1.9.1.1 test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-unbundled-1.8.5.2 test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-unbundled-1.8.5.1 test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-unbundled-1.8.4.2 test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb
vagrant-unbundled-1.8.4.1 test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb