summaryrefslogtreecommitdiffstats
path: root/test/language
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-07-27 11:34:32 -0700
committermarkus <markus@AVA-351181.(none)>2010-08-03 15:19:31 -0700
commit00ebf01227745edc84084d10a9d8be7439551b0f (patch)
tree5e334b8f01f4091bd1e25fa2b36731bf4a800bfd /test/language
parente32320ee2c65275e3c695c555f506a499209efa1 (diff)
downloadpuppet-00ebf01227745edc84084d10a9d8be7439551b0f.tar.gz
puppet-00ebf01227745edc84084d10a9d8be7439551b0f.tar.xz
puppet-00ebf01227745edc84084d10a9d8be7439551b0f.zip
[#4344] Fix for failing templates when module name matches file in local dir.
When the name of a module matches the name of a file in the local directory, puppet agent would sometimes try to read that file and interpret it as puppet code. This happened because files.rb was unintentionally permitting puppet files without an extension. Fixed by changing the glob pattern to only permit ".pp" and ".rb" extensions.
Diffstat (limited to 'test/language')
-rwxr-xr-xtest/language/parser.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/language/parser.rb b/test/language/parser.rb
index 5a433c724..8cda8eeb2 100755
--- a/test/language/parser.rb
+++ b/test/language/parser.rb
@@ -97,7 +97,7 @@ class TestParser < Test::Unit::TestCase
}
4.times { |i|
- path = File.join(basedir, subdir, "subfile#{i}")
+ path = File.join(basedir, subdir, "subfile#{i}.pp")
mkmanifest(path)
}
@@ -137,8 +137,8 @@ class TestParser < Test::Unit::TestCase
end
def test_importedclasses
- imported = tempfile
- importer = tempfile
+ imported = tempfile '.pp'
+ importer = tempfile '.pp'
made = tempfile
@@ -655,9 +655,9 @@ file { "/tmp/yayness":
end
def test_multiple_imports_on_one_line
- one = tempfile
- two = tempfile
- base = tempfile
+ one = tempfile '.pp'
+ two = tempfile '.pp'
+ base = tempfile '.pp'
File.open(one, "w") { |f| f.puts "$var = value" }
File.open(two, "w") { |f| f.puts "$var = value" }
File.open(base, "w") { |f| f.puts "import '#{one}', '#{two}'" }