diff options
author | Markus Roberts <Markus@reality.com> | 2010-02-09 15:17:53 -0800 |
---|---|---|
committer | Markus Roberts <Markus@reality.com> | 2010-02-09 15:17:53 -0800 |
commit | 27322e5460130b854835aef56ab7076bab83a00b (patch) | |
tree | b69501ce3c7fd616880f60999ad38304a40abba2 /spec/integration/bin | |
parent | 70c71c58c1dd038d033d5fdd3fecc8f15b11fd52 (diff) | |
parent | 71653a74d91b1e6e9845b4a41249861319c0d6b0 (diff) | |
download | puppet-27322e5460130b854835aef56ab7076bab83a00b.tar.gz puppet-27322e5460130b854835aef56ab7076bab83a00b.tar.xz puppet-27322e5460130b854835aef56ab7076bab83a00b.zip |
Merge branch '0.25.x'
Conflicts:
lib/puppet/agent.rb
lib/puppet/application/puppet.rb
lib/puppet/configurer.rb
man/man5/puppet.conf.5
spec/integration/defaults.rb
spec/unit/configurer.rb
Diffstat (limited to 'spec/integration/bin')
-rwxr-xr-x | spec/integration/bin/puppetmasterd.rb | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/spec/integration/bin/puppetmasterd.rb b/spec/integration/bin/puppetmasterd.rb index 579a42d88..095263570 100755 --- a/spec/integration/bin/puppetmasterd.rb +++ b/spec/integration/bin/puppetmasterd.rb @@ -16,6 +16,10 @@ describe "puppetmasterd" do Puppet[:certdnsnames] = "localhost" @@port = 12345 + + Puppet::SSL::Host.instance_eval{ + @value_cache = {} + } end after { @@ -48,7 +52,7 @@ describe "puppetmasterd" do f.puts { "notify { testing: }" } end - args = arguments + addl_args + args = arguments + " " + addl_args bin = File.join(File.dirname(__FILE__), "..", "..", "..", "sbin", "puppetmasterd") lib = File.join(File.dirname(__FILE__), "..", "..", "..", "lib") @@ -56,9 +60,22 @@ describe "puppetmasterd" do end def stop - if @pidfile and FileTest.exist?(@pidfile) + if @pidfile and File.exist?(@pidfile) pid = File.read(@pidfile).chomp.to_i Process.kill(:TERM, pid) + 10.times do + break unless File.exist?(@pidfile) + sleep 1 + end + begin + # sigkill and report if process was still running + Process.kill(:KILL, pid) + + raise "Process didn't die from SIGTERM after 10 seconds" + rescue Errno::ESRCH + # process wasn't running. good. + end + end end @@ -73,16 +90,10 @@ describe "puppetmasterd" do it "should be serving status information over xmlrpc" do start - sleep 5 + sleep 6 client = Puppet::Network::Client.status.new(:Server => "localhost", :Port => @@port) - FileUtils.mkdir_p(File.dirname(Puppet[:autosign])) - File.open(Puppet[:autosign], "w") { |f| - f.puts Puppet[:certname] - } - - client.cert retval = client.status retval.should == 1 |