diff options
author | Dominic Maraglia <dmaraglia@gmail.com> | 2011-05-20 15:45:57 -0700 |
---|---|---|
committer | Dominic Maraglia <dmaraglia@gmail.com> | 2011-05-20 15:45:57 -0700 |
commit | 4645c99166f415b87ac1bfd01caebdcbeb65d19f (patch) | |
tree | 85af6c106205bd7aebd8617c8622b3e5d0391b47 /acceptance | |
parent | 58f938bae058fbae8c3f22d229ffd755f7447d6d (diff) | |
download | puppet-4645c99166f415b87ac1bfd01caebdcbeb65d19f.tar.gz puppet-4645c99166f415b87ac1bfd01caebdcbeb65d19f.tar.xz puppet-4645c99166f415b87ac1bfd01caebdcbeb65d19f.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.rb | 12 |
1 files changed, 11 insertions, 1 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..79f56c07a 100644 --- a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb +++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb @@ -17,7 +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" |