summaryrefslogtreecommitdiffstats
path: root/test/executables
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-08-29 22:53:17 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-08-29 22:53:17 +0000
commitf65563d3d6eddeeac5f1b14e7b2635776be802a7 (patch)
treed893aa719fa360d10871bd40fab35540f1234f50 /test/executables
parent062906591bc21d761ed00d33f9fa95c425b16ccd (diff)
downloadpuppet-f65563d3d6eddeeac5f1b14e7b2635776be802a7.tar.gz
puppet-f65563d3d6eddeeac5f1b14e7b2635776be802a7.tar.xz
puppet-f65563d3d6eddeeac5f1b14e7b2635776be802a7.zip
changing default hostname to "puppet", and adding --parseonly option along with a test case for it
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@606 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/executables')
-rwxr-xr-xtest/executables/tc_puppetmasterd.rb22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/executables/tc_puppetmasterd.rb b/test/executables/tc_puppetmasterd.rb
index ef89aa044..7f79f3ee5 100755
--- a/test/executables/tc_puppetmasterd.rb
+++ b/test/executables/tc_puppetmasterd.rb
@@ -60,7 +60,7 @@ class TestPuppetMasterD < Test::Unit::TestCase
pid = nil
%x{#{ps}}.chomp.split(/\n/).each { |line|
- if line =~ /puppetmasterd --manifest/
+ if line =~ /ruby.+puppetmasterd/
ary = line.split(" ")
pid = ary[1].to_i
end
@@ -122,7 +122,25 @@ class TestPuppetMasterD < Test::Unit::TestCase
assert_nothing_raised {
Marshal::load(CGI.unescape(retval))
}
- #stopmasterd
+ stopmasterd
+ end
+
+ def test_parseonly
+ file = File.join($puppetbase, "examples", "code", "head")
+ startmasterd("--parseonly --manifest #{file}")
+
+ pid = nil
+ ps = Facter["ps"].value || "ps -ef"
+ %x{#{ps}}.chomp.split(/\n/).each { |line|
+ if line =~ /puppetmasterd --manifest/
+ ary = line.split(" ")
+ pid = ary[1].to_i
+ end
+ }
+
+ assert($? == 0, "Puppetmasterd ended with non-zero exit status")
+
+ assert_nil(pid, "Puppetmasterd is still running after parseonly")
end
def disabled_test_sslconnection