aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrayfishx <craig@craigdunn.org>2012-07-11 10:51:18 -0700
committercrayfishx <craig@craigdunn.org>2012-07-11 10:51:18 -0700
commitb5fce3cce34c5ff01243a4dfe9205d26f3c98857 (patch)
treef3b5ef38e39ef4c2d89b235b26053a416dc4946a
parent2c4423a83a96215de6746873069f40f279e887ff (diff)
downloadpuppet-tftp-b5fce3cce34c5ff01243a4dfe9205d26f3c98857.tar.gz
puppet-tftp-b5fce3cce34c5ff01243a4dfe9205d26f3c98857.tar.bz2
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
-rw-r--r--manifests/file.pp4
-rw-r--r--spec/fixtures/manifests/site.pp0
2 files changed, 2 insertions, 2 deletions
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
--- a/spec/fixtures/manifests/site.pp
+++ /dev/null