diff options
author | Luke Kanies <luke@madstop.com> | 2008-02-13 16:27:35 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-02-13 16:27:35 -0600 |
commit | 0cfa1d2b7ae38020d3b845d7713cb10cda7facef (patch) | |
tree | fcfa2861cb0174ab610235a14c69909d094de4a8 /test | |
parent | 8367fdfab25aacb56f16444f5763b347e6a907ab (diff) | |
download | puppet-0cfa1d2b7ae38020d3b845d7713cb10cda7facef.tar.gz puppet-0cfa1d2b7ae38020d3b845d7713cb10cda7facef.tar.xz puppet-0cfa1d2b7ae38020d3b845d7713cb10cda7facef.zip |
Fixed #968 again, this time with tests -- parseonly works,
including not compiling the configurations, and also storeconfigs
is no longer required during parse-testing.
Diffstat (limited to 'test')
-rwxr-xr-x | test/executables/puppetbin.rb | 17 |
1 files changed, 17 insertions, 0 deletions
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 |