From 0cfa1d2b7ae38020d3b845d7713cb10cda7facef Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 13 Feb 2008 16:27:35 -0600 Subject: Fixed #968 again, this time with tests -- parseonly works, including not compiling the configurations, and also storeconfigs is no longer required during parse-testing. --- test/executables/puppetbin.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/executables') diff --git a/test/executables/puppetbin.rb b/test/executables/puppetbin.rb index 218787c92..08329efb6 100755 --- a/test/executables/puppetbin.rb +++ b/test/executables/puppetbin.rb @@ -83,5 +83,22 @@ class TestPuppetBin < Test::Unit::TestCase assert(FileTest.exists?(path), "Failed to create config'ed file") end + + def test_parseonly + path = tempfile() + manifest = tempfile() + puppet = %x{which puppet}.chomp + if puppet == "" + Puppet.info "cannot find puppet; cannot test parseonly" + return + end + code = 'File <<| |>> + include nosuchclass' + + assert_nothing_raised { + IO.popen("#{puppet} --parseonly", 'w') { |p| p.puts code } + } + assert($? == 0, "parseonly test exited with code %s" % $?.to_i) + end end -- cgit