-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #334 from james-stocks/PCP-293
(PCP-293 & PCP-294)
- Loading branch information
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'pxp-agent/config_helper.rb' | ||
require 'pxp-agent/test_helper.rb' | ||
|
||
test_name 'C94789 - An associated agent should automatically reconnect when the broker was temporarily unavailable' | ||
|
||
step 'Ensure each agent host has pxp-agent running and associated' do | ||
agents.each_with_index do |agent, i| | ||
on agent, puppet('resource service pxp-agent ensure=stopped') | ||
cert_dir = configure_std_certs_on_host(agent) | ||
create_remote_file(agent, pxp_agent_config_file(agent), pxp_config_json_using_test_certs(master, agent, i + 1, cert_dir).to_s) | ||
on(agent, "rm -rf #{logfile(agent)}") | ||
on agent, puppet('resource service pxp-agent ensure=running') | ||
assert(is_associated?(master, "pcp://client0#{i+1}.example.com/agent"), | ||
"Agent identity pcp://client0#{i+1}.example.com/agent for agent host #{agent} does not appear in pcp-broker's client inventory") | ||
end | ||
end | ||
|
||
step 'On master, stop then restart the broker' do | ||
kill_pcp_broker(master) | ||
run_pcp_broker(master) | ||
end | ||
|
||
step 'On each agent, test that a 2nd association has occurred' do | ||
agents.each_with_index do |agent, i| | ||
assert(is_associated?(master, "pcp://client0#{i+1}.example.com/agent"), | ||
"Agent identity pcp://client0#{i+1}.example.com/agent for agent host #{agent} does not appear in pcp-broker's client inventory") | ||
end | ||
end |