Sha256: fe413692b895e21207b92b6b2c890616be641d7741ef920a68906bc8860d846e

Contents?: true

Size: 1.08 KB

Versions: 15

Compression:

Stored size: 1.08 KB

Contents

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 ".mount_nfs_folder" do
    let(:cap) { caps.get(:mount_nfs_folder) }

    let(:ip) { "1.2.3.4" }

    let(:hostpath) { "/host" }
    let(:guestpath) { "/guest" }

    it "mounts the folder" do
      folders = {
        "/vagrant-nfs" => {
          type: :nfs,
          guestpath: "/guest",
          hostpath: "/host",
        }
      }
      cap.mount_nfs_folder(machine, ip, folders)

      expect(comm.received_commands[0]).to match(/mkdir -p '#{guestpath}'/)
      expect(comm.received_commands[0]).to match(/'1.2.3.4:#{hostpath}' '#{guestpath}'/)
    end

    it "mounts with options" do
      pending "not yet implemented"
    end
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

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