Give cookbooks and role shared folders unique IDs
This commit is contained in:
parent
a9c261090e
commit
4586bc554d
|
@ -16,13 +16,13 @@ module Vagrant
|
|||
|
||||
def share_cookbook_folders
|
||||
host_cookbook_paths.each_with_index do |cookbook, i|
|
||||
env.config.vm.share_folder("vagrant-chef-solo-#{i}", cookbook_path(i), cookbook)
|
||||
env.config.vm.share_folder("vagrant-chef-solo-cookbooks-#{i}", cookbook_path(i), cookbook)
|
||||
end
|
||||
end
|
||||
|
||||
def share_role_folders
|
||||
host_role_paths.each_with_index do |role, i|
|
||||
env.config.vm.share_folder("vagrant-chef-solo-#{i}", role_path(i), role)
|
||||
env.config.vm.share_folder("vagrant-chef-solo-roles-#{i}", role_path(i), role)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
|
|||
should "share each cookbook folder" do
|
||||
share_seq = sequence("share_seq")
|
||||
@host_cookbook_paths.each_with_index do |cookbook, i|
|
||||
@env.config.vm.expects(:share_folder).with("vagrant-chef-solo-#{i}", @action.cookbook_path(i), cookbook).in_sequence(share_seq)
|
||||
@env.config.vm.expects(:share_folder).with("vagrant-chef-solo-cookbooks-#{i}", @action.cookbook_path(i), cookbook).in_sequence(share_seq)
|
||||
end
|
||||
|
||||
@action.share_cookbook_folders
|
||||
|
@ -54,7 +54,7 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
|
|||
should "share each role folder" do
|
||||
share_seq = sequence("share_seq")
|
||||
@host_role_paths.each_with_index do |role, i|
|
||||
@env.config.vm.expects(:share_folder).with("vagrant-chef-solo-#{i}", @action.role_path(i), role).in_sequence(share_seq)
|
||||
@env.config.vm.expects(:share_folder).with("vagrant-chef-solo-roles-#{i}", @action.role_path(i), role).in_sequence(share_seq)
|
||||
end
|
||||
|
||||
@action.share_role_folders
|
||||
|
|
Loading…
Reference in New Issue