Minor tweaks to specs introduced by GH-329

This commit is contained in:
Fabio Rehm 2015-01-11 21:16:30 -02:00
parent 555499d04a
commit f4b738ebd9

View file

@ -176,20 +176,19 @@ describe Vagrant::LXC::Driver do
end
describe 'folder sharing' do
rootfs_path = Pathname('/path/to/rootfs')
let(:shared_folder) { {guestpath: '/vagrant', hostpath: '/path/to/host/dir'} }
let(:ro_rw_folder) { {guestpath: '/vagrant/ro_rw', hostpath: '/path/to/host/dir', mount_options: ['ro', 'rw']} }
let(:with_space_folder) { {guestpath: '/tmp/with space', hostpath: '/path/with space'} }
let(:folders) { [shared_folder, ro_rw_folder, with_space_folder] }
let(:expected_guest_path) { "vagrant" }
let(:sudo_wrapper) { double(Vagrant::LXC::SudoWrapper, run: true) }
let(:rootfs_path) { Pathname('/path/to/rootfs') }
subject { described_class.new('name', sudo_wrapper) }
describe "with fixed rootfs" do
before do
subject.stub(rootfs_path: rootfs_path, system: true)
subject.stub(rootfs_path: Pathname('/path/to/rootfs'), system: true)
subject.share_folders(folders)
end
@ -220,7 +219,8 @@ describe Vagrant::LXC::Driver do
end
describe "with directory-based LXC config" do
config_string = <<-ENDCONFIG.gsub(/^\s+/, '')
let(:config_string) {
<<-ENDCONFIG.gsub(/^\s+/, '')
# Blah blah comment
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
lxc.mount.entry = sysfs sys sysfs defaults 0 0
@ -232,6 +232,7 @@ describe Vagrant::LXC::Driver do
lxc.network.name=eth1
# VAGRANT-END
ENDCONFIG
}
before do
subject { described_class.new('name', sudo_wrapper) }
@ -248,7 +249,8 @@ describe Vagrant::LXC::Driver do
end
describe "with overlayfs-based LXC config" do
config_string = <<-ENDCONFIG.gsub(/^\s+/, '')
let(:config_string) {
<<-ENDCONFIG.gsub(/^\s+/, '')
# Blah blah comment
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
lxc.mount.entry = sysfs sys sysfs defaults 0 0
@ -260,6 +262,7 @@ describe Vagrant::LXC::Driver do
lxc.network.name=eth1
# VAGRANT-END
ENDCONFIG
}
before do
subject { described_class.new('name', sudo_wrapper) }