Append openstacklib/lib to load path for type

As we discovered before[1] with puppet-keystone, rspec-puppet has
trouble loading paths in some circumstances. This patch updates the
$LOAD_PATH in the newly rewritten glance_image type so that unit tests
in other modules can properly load the openstacklib backend.

[1] https://bugs.launchpad.net/puppet-keystone/+bug/1408531

Change-Id: Ifa3cbd46b8b32695848d4c2e8f837881c46a7d98
This commit is contained in:
Colleen Murphy 2015-08-11 17:48:33 -07:00
parent 4bbdb70dbf
commit ed81166320
1 changed files with 1 additions and 0 deletions

View File

@ -1,3 +1,4 @@
File.expand_path('../../../../openstacklib/lib', File.dirname(__FILE__)).tap { |dir| $LOAD_PATH.unshift(dir) unless $LOAD_PATH.include?(dir) }
Puppet::Type.newtype(:glance_image) do
desc <<-EOT
This allows manifests to declare an image to be