summaryrefslogtreecommitdiffstats
path: root/test/executables
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-08-28 02:23:10 +0000
committerLuke Kanies <luke@madstop.com>2005-08-28 02:23:10 +0000
commitf2795359521709b5d4a64900ebed5e7b0be84c6b (patch)
tree59aba403256c85c6d0de6170422f2c2066329aa8 /test/executables
parent28be88cc6e13c1af193fe01d56a1a446a18e01bb (diff)
downloadpuppet-f2795359521709b5d4a64900ebed5e7b0be84c6b.tar.gz
puppet-f2795359521709b5d4a64900ebed5e7b0be84c6b.tar.xz
puppet-f2795359521709b5d4a64900ebed5e7b0be84c6b.zip
This should be the commit that brings us to Beta 1. All tests pass, although I get some (gracefully handled) failures in tc_metrics.rb, and there is now a config file for the fileserver module, including authorization specification for it. I have also reworked error handling in the xmlrpc client and server so errors should propagate more correctly.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@594 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/executables')
-rwxr-xr-xtest/executables/tc_puppetd.rb8
-rwxr-xr-xtest/executables/tc_puppetmasterd.rb15
2 files changed, 12 insertions, 11 deletions
diff --git a/test/executables/tc_puppetd.rb b/test/executables/tc_puppetd.rb
index 264bc80ef..38e382392 100755
--- a/test/executables/tc_puppetd.rb
+++ b/test/executables/tc_puppetd.rb
@@ -47,7 +47,7 @@ class TestPuppetDExe < Test::Unit::TestCase
assert_nothing_raised {
output = %x{puppetmasterd --port #{Puppet[:masterport]} --manifest #{file}}.chomp
}
- assert($? == 0)
+ assert($? == 0, "Puppetmasterd return status was %s" % $?)
@@tmppids << $?.pid
assert_equal("", output)
end
@@ -62,7 +62,7 @@ class TestPuppetDExe < Test::Unit::TestCase
pid = ary[1].to_i
end
}
- assert(pid)
+ assert(pid, "No puppetmasterd pid")
assert_nothing_raised {
Process.kill("-INT", pid)
@@ -75,8 +75,8 @@ class TestPuppetDExe < Test::Unit::TestCase
assert_nothing_raised {
output = %x{puppetd --server localhost}.chomp
}
- assert($? == 0)
- assert_equal("", output)
+ assert($? == 0, "Puppetd exited with code %s" % $?)
+ assert_equal("", output, "Puppetd produced output %s" % output)
assert_nothing_raised {
socket = TCPSocket.new("127.0.0.1", Puppet[:masterport])
diff --git a/test/executables/tc_puppetmasterd.rb b/test/executables/tc_puppetmasterd.rb
index 44aa03da4..ef89aa044 100755
--- a/test/executables/tc_puppetmasterd.rb
+++ b/test/executables/tc_puppetmasterd.rb
@@ -38,6 +38,7 @@ class TestPuppetMasterD < Test::Unit::TestCase
Puppet[:loglevel] = :debug
end
@@tmpfiles = []
+ @port = 8320
end
def startmasterd(args)
@@ -48,10 +49,10 @@ class TestPuppetMasterD < Test::Unit::TestCase
# cmd += " --debug"
#end
assert_nothing_raised {
- output = %x{puppetmasterd #{args}}.chomp
+ output = %x{puppetmasterd --port #{@port} #{args}}.chomp
}
- assert($? == 0)
- assert_equal("", output)
+ assert($? == 0, "Puppetmasterd exit status was %s" % $?)
+ assert_equal("", output, "Puppetmasterd produced output %s" % output)
end
def stopmasterd(running = true)
@@ -91,13 +92,13 @@ class TestPuppetMasterD < Test::Unit::TestCase
startmasterd("--manifest #{file}")
assert_nothing_raised {
- socket = TCPSocket.new("127.0.0.1", Puppet[:masterport])
+ socket = TCPSocket.new("127.0.0.1", @port)
socket.close
}
client = nil
assert_nothing_raised() {
- client = XMLRPC::Client.new("localhost", "/RPC2", Puppet[:masterport],
+ client = XMLRPC::Client.new("localhost", "/RPC2", @port,
nil, nil, nil, nil, true, 5)
}
retval = nil
@@ -105,7 +106,7 @@ class TestPuppetMasterD < Test::Unit::TestCase
assert_nothing_raised() {
retval = client.call("status.status", "")
}
- assert_equal(1, retval)
+ assert_equal(1, retval, "Status.status return value was %s" % retval)
facts = {}
Facter.each { |p,v|
facts[p] = v
@@ -149,7 +150,7 @@ class TestPuppetMasterD < Test::Unit::TestCase
assert_nothing_raised() {
retval = client.nothing
}
- assert_equal(1, retval)
+ assert_equal(1, retval, "return value was %s" % retval)
facts = {}
Facter.each { |p,v|
facts[p] = v