Minor tweaks to specs introduced by GH-329
This commit is contained in:
parent
555499d04a
commit
f4b738ebd9
1 changed files with 32 additions and 29 deletions
|
@ -176,20 +176,19 @@ describe Vagrant::LXC::Driver do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'folder sharing' do
|
describe 'folder sharing' do
|
||||||
rootfs_path = Pathname('/path/to/rootfs')
|
|
||||||
|
|
||||||
let(:shared_folder) { {guestpath: '/vagrant', hostpath: '/path/to/host/dir'} }
|
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(: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(:with_space_folder) { {guestpath: '/tmp/with space', hostpath: '/path/with space'} }
|
||||||
let(:folders) { [shared_folder, ro_rw_folder, with_space_folder] }
|
let(:folders) { [shared_folder, ro_rw_folder, with_space_folder] }
|
||||||
let(:expected_guest_path) { "vagrant" }
|
let(:expected_guest_path) { "vagrant" }
|
||||||
let(:sudo_wrapper) { double(Vagrant::LXC::SudoWrapper, run: true) }
|
let(:sudo_wrapper) { double(Vagrant::LXC::SudoWrapper, run: true) }
|
||||||
|
let(:rootfs_path) { Pathname('/path/to/rootfs') }
|
||||||
|
|
||||||
subject { described_class.new('name', sudo_wrapper) }
|
subject { described_class.new('name', sudo_wrapper) }
|
||||||
|
|
||||||
describe "with fixed rootfs" do
|
describe "with fixed rootfs" do
|
||||||
before 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)
|
subject.share_folders(folders)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -220,7 +219,8 @@ describe Vagrant::LXC::Driver do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "with directory-based LXC config" do
|
describe "with directory-based LXC config" do
|
||||||
config_string = <<-ENDCONFIG.gsub(/^\s+/, '')
|
let(:config_string) {
|
||||||
|
<<-ENDCONFIG.gsub(/^\s+/, '')
|
||||||
# Blah blah comment
|
# Blah blah comment
|
||||||
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
|
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
|
||||||
lxc.mount.entry = sysfs sys sysfs defaults 0 0
|
lxc.mount.entry = sysfs sys sysfs defaults 0 0
|
||||||
|
@ -232,6 +232,7 @@ describe Vagrant::LXC::Driver do
|
||||||
lxc.network.name=eth1
|
lxc.network.name=eth1
|
||||||
# VAGRANT-END
|
# VAGRANT-END
|
||||||
ENDCONFIG
|
ENDCONFIG
|
||||||
|
}
|
||||||
|
|
||||||
before do
|
before do
|
||||||
subject { described_class.new('name', sudo_wrapper) }
|
subject { described_class.new('name', sudo_wrapper) }
|
||||||
|
@ -248,7 +249,8 @@ describe Vagrant::LXC::Driver do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "with overlayfs-based LXC config" do
|
describe "with overlayfs-based LXC config" do
|
||||||
config_string = <<-ENDCONFIG.gsub(/^\s+/, '')
|
let(:config_string) {
|
||||||
|
<<-ENDCONFIG.gsub(/^\s+/, '')
|
||||||
# Blah blah comment
|
# Blah blah comment
|
||||||
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
|
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
|
||||||
lxc.mount.entry = sysfs sys sysfs defaults 0 0
|
lxc.mount.entry = sysfs sys sysfs defaults 0 0
|
||||||
|
@ -260,6 +262,7 @@ describe Vagrant::LXC::Driver do
|
||||||
lxc.network.name=eth1
|
lxc.network.name=eth1
|
||||||
# VAGRANT-END
|
# VAGRANT-END
|
||||||
ENDCONFIG
|
ENDCONFIG
|
||||||
|
}
|
||||||
|
|
||||||
before do
|
before do
|
||||||
subject { described_class.new('name', sudo_wrapper) }
|
subject { described_class.new('name', sudo_wrapper) }
|
||||||
|
|
Loading…
Reference in a new issue