summaryrefslogtreecommitdiffstats
path: root/acceptance
diff options
context:
space:
mode:
authorDominic Maraglia <dominic@puppetlabs.com>2011-05-24 11:28:40 -0700
committerDominic Maraglia <dominic@puppetlabs.com>2011-05-27 13:50:40 -0700
commit3facc3393378ef7848374621a4674c977e82f884 (patch)
tree1b9efa8f3e65c50d8f9659f1e6edb59d80157606 /acceptance
parent68c106e3ef192d64eb5a1e8daa1e070774909728 (diff)
downloadpuppet-3facc3393378ef7848374621a4674c977e82f884.tar.gz
puppet-3facc3393378ef7848374621a4674c977e82f884.tar.xz
puppet-3facc3393378ef7848374621a4674c977e82f884.zip
add puppet master polling step for ticket 7117
The test for ticket 7117 producedes spurious failures due to timing: a curl command is executed from an agent to a freshly started Puppet Master; if the Puppet Master is not ready to accept the connection the test will fail. Added an until loop that issues simple curl command to see if the Puppet Master is up and ready
Diffstat (limited to 'acceptance')
-rw-r--r--acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
index 3f762bcca..37c71893c 100644
--- a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
+++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb
@@ -17,9 +17,17 @@ on master, "ps -U puppet | awk '/puppet/ { print \$1 }' | xargs kill || echo \"P
step "Master: Start Puppet Master"
on master, puppet_master("--certdnsnames=\"puppet:$(hostname -s):$(hostname -f)\" --verbose --noop")
# allow Master to start and initialize environment
-sleep 1
-
+step "Verify Puppet Master is ready to accept connections"
+host=agents.first
+time1 = Time.new
+until
+ on(host, "curl -k https://#{master}:8140") do
+ sleep 1
+ end
+time2 = Time.new
+elapsed = time2 - time1
+Log.notify "Slept for #{elapsed} seconds waiting for Puppet Master to become ready"
# Run test on Agents
step "Agent: agent --test"