From: crayfishx Date: Wed, 11 Jul 2012 17:51:18 +0000 (-0700) Subject: Fully qualify $::caller_module_name fact. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=b5fce3cce34c5ff01243a4dfe9205d26f3c98857;p=puppet-tftp.git Fully qualify $::caller_module_name fact. This fixes the following failed test: 1) tftp::file when deploying file from another module Failure/Error: }) expected that the catalogue would contain File[/srv/tftp/sample] with source set to `"puppet:///modules/acme/sample"` but it is set to `"puppet:///modules/tftp/sample"` in the catalogue # ./spec/defines/tftp_file_spec.rb:138 --- diff --git a/manifests/file.pp b/manifests/file.pp index 3628188..6eaa394 100644 --- a/manifests/file.pp +++ b/manifests/file.pp @@ -44,8 +44,8 @@ define tftp::file ( if $source { $source_real = $source } elsif $ensure != 'directory' and ! $content { - if $caller_module_name { - $mod = $caller_module_name + if $::caller_module_name { + $mod = $::caller_module_name } else { $mod = $module_name } diff --git a/spec/fixtures/manifests/site.pp b/spec/fixtures/manifests/site.pp deleted file mode 100644 index e69de29..0000000