Please review pull request #356: (#11767) No longer necessary to delete ssl directory in test cases opened by (joshcooper)
Description:
Previously, each TestCase that used with_master_running_on
had to
remember to delete the ssl directories from every host. Otherwise, if
either the master or any of its agents used a certificate from a
previous run, the test would fail.
Also, previously, TestCases were not consistent in how they referenced
the ssl directory: /etc/puppet/ssl, #{host['puppetpath']}/ssl,
on the configuration file being used.
Deletion of the ssl directories now happens within thewith_master_running_on method
itself, so that individual TestCases
don't need to.
- Opened: Fri Jan 20 23:33:48 UTC 2012
- Based on: puppetlabs:2.7rc (e1828ba69b50237e70b6fa2f8c424f68ce3bb4fd)
- Requested merge: joshcooper:ticket/2.7rc/11767-remove-ssldir-cleaning (0d8a22a1f05c159746f19b6f8d24d975e9d64c92)
Diff follows:
diff --git a/acceptance/tests/allow_arbitrary_node_name_fact_for_agent.rb b/acceptance/tests/allow_arbitrary_node_name_fact_for_agent.rb index c08c2e9..a8bf06a 100644 --- a/acceptance/tests/allow_arbitrary_node_name_fact_for_agent.rb +++ b/acceptance/tests/allow_arbitrary_node_name_fact_for_agent.rb @@ -39,8 +39,6 @@ on master, "chmod 644 #{authfile} #{manifest_file}" -on hosts, "rm -rf /etc/puppet/ssl" - with_master_running_on(master, "--rest_authconfig #{authfile} --manifest #{manifest_file} --daemonize --dns_alt_names=\"puppet, $(hostname -s), $(hostname -f)\" --autosign true") do run_agent_on(agents, "--no-daemonize --verbose --onetime --node_name_fact kernel --server #{master}") do assert_match(success_message, stdout) diff --git a/acceptance/tests/allow_arbitrary_node_name_for_agent.rb b/acceptance/tests/allow_arbitrary_node_name_for_agent.rb index f35c32b..46c22a8 100644 --- a/acceptance/tests/allow_arbitrary_node_name_for_agent.rb +++ b/acceptance/tests/allow_arbitrary_node_name_for_agent.rb @@ -22,8 +22,6 @@ on master, "chmod 644 #{authfile} #{manifest_file}" -on hosts, "rm -rf /etc/puppet/ssl" - with_master_running_on(master, "--rest_authconfig #{authfile} --manifest #{manifest_file} --daemonize --dns_alt_names=\"puppet, $(hostname -s), $(hostname -f)\" --autosign true") do run_agent_on(agents, "--no-daemonize --verbose --onetime --node_name_value specified_node_name --server #{master}") do assert_match(success_message, stdout) diff --git a/acceptance/tests/helpful_error_message_when_hostname_not_match_server_certificate.rb b/acceptance/tests/helpful_error_message_when_hostname_not_match_server_certificate.rb index 6b0566e..8b64436 100644 --- a/acceptance/tests/helpful_error_message_when_hostname_not_match_server_certificate.rb +++ b/acceptance/tests/helpful_error_message_when_hostname_not_match_server_certificate.rb @@ -1,8 +1,5 @@ test_name "generate a helpful error message when hostname doesn't match server certificate" -step "Clear any existing SSL directories" -on(hosts, "rm -rf #{config['puppetpath']}/ssl") - # Start the master with a certname not matching its hostname with_master_running_on(master, "--certname foobar_not_my_hostname --dns_alt_names one_cert,two_cert,red_cert,blue_cert --autosign true") do run_agent_on(agents, "--no-daemonize --verbose --onetime --server #{master}", :acceptable_exit_codes => (1..255)) do diff --git a/acceptance/tests/ticket_3360_allow_duplicate_csr_with_option_set.rb b/acceptance/tests/ticket_3360_allow_duplicate_csr_with_option_set.rb index edd52b4..005141e 100644 --- a/acceptance/tests/ticket_3360_allow_duplicate_csr_with_option_set.rb +++ b/acceptance/tests/ticket_3360_allow_duplicate_csr_with_option_set.rb @@ -2,9 +2,6 @@ agent_hostnames = agents.map {|a| a.to_s} -step "Remove existing SSL directory for hosts" -on hosts, "rm -r #{config['puppetpath']}/ssl" - with_master_running_on master, "--allow_duplicate_certs --dns_alt_names=\"puppet,$(hostname -s),$(hostname -f)\" --verbose --noop" do step "Generate a certificate request for the agent" on agents, "puppet certificate generate `hostname -f` --ca-location remote --server #{master}" diff --git a/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb b/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb index 347b599..30ac77d 100644 --- a/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb +++ b/acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb @@ -9,7 +9,6 @@ manifest_file = "/tmp/missing_site-5477-#{$$}.pp" on master, "rm -f #{manifest_file}" -on hosts, "rm -rf /etc/puppet/ssl" with_master_running_on(master, "--manifest #{manifest_file} --dns_alt_names=\"puppet, $(hostname -s), $(hostname -f)\" --verbose --filetimeout 1 --autosign true") do # Run test on Agents diff --git a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb index eda6ae3..bb0b0ab 100644 --- a/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb +++ b/acceptance/tests/ticket_7117_broke_env_criteria_authconf.rb @@ -13,8 +13,6 @@ on master, "chmod 644 /tmp/auth.conf-7117" -on hosts, "rm -rf /etc/puppet/ssl" - with_master_running_on(master, "--dns_alt_names=\"puppet, $(hostname -s), $(hostname -f)\" --rest_authconfig /tmp/auth.conf-7117 --verbose --autosign true") do # Run test on Agents step "Run agent to upload facts"
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.