From ed81166320fa3c62b5bb85dfb5e91780b787dd77 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 11 Aug 2015 17:48:33 -0700 Subject: [PATCH] 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 --- lib/puppet/type/glance_image.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/puppet/type/glance_image.rb b/lib/puppet/type/glance_image.rb index 76783f5f..658acc5c 100644 --- a/lib/puppet/type/glance_image.rb +++ b/lib/puppet/type/glance_image.rb @@ -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