Sha256: 1c90e54871272d5fdc2e4caec7be89082ed2f44350c3efb84b71bcd70e071507
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
if __FILE__ == $0 $:.unshift '../../lib' $:.unshift '..' $puppetbase = "../.." end require 'puppet' require 'puppet/server' require 'test/unit' require 'puppettest.rb' require 'socket' require 'facter' class TestPuppetDExe < Test::Unit::TestCase include ExeTest def test_normalstart # start the master file = startmasterd # create the client client = Puppet::Client::MasterClient.new(:Server => "localhost", :Port => @@port) # make a new fqdn fqdn = client.fqdn.sub(/^\w+\./, "testing.") cmd = "puppetd" cmd += " --verbose" cmd += " --onetime" #cmd += " --fqdn %s" % fqdn cmd += " --masterport %s" % @@port cmd += " --confdir %s" % Puppet[:confdir] cmd += " --vardir %s" % Puppet[:vardir] cmd += " --server localhost" # and verify our daemon runs assert_nothing_raised { %x{#{cmd} 2>&1} } sleep 1 assert($? == 0, "Puppetd exited with code %s" % $?) assert(FileTest.exists?(@createdfile), "Failed to create config'ed file") # now verify that --noop works File.unlink(@createdfile) cmd += " --noop" assert_nothing_raised { output = %x{#{cmd}}.chomp } sleep 1 assert($? == 0, "Puppetd exited with code %s" % $?) assert(! FileTest.exists?(@createdfile), "Noop created config'ed file") stopmasterd end end # $Id: puppetd.rb 1256 2006-06-13 15:57:06Z luke $
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.18.4 | test/executables/puppetd.rb |