Sha256: 34e8dffaa8346c6488cb390c5b1842fd225462272eed702e99ac54f7dfa78165
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 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.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 { system cmd } 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 873 2006-02-07 23:12:33Z luke $
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.13.0 | test/executables/puppetd.rb |
puppet-0.13.1 | test/executables/puppetd.rb |
puppet-0.13.2 | test/executables/puppetd.rb |