puppetlabs/puppet — pull request #3387 by joshcooper (2014-12-05 06:32:40+00:00)
Title: (PUP-3739) Don't require master to have agent role

Previously, when executing acceptance tests from a git checkout, the
master host also needed to have the agent role. This is because the
010_TestSetup step only created `/etc/puppet/puppet.conf` for agents.

If you tried to run against a master host that didn't have the agent
role, then puppet.conf was never created. So later when trying to start
the master via `with_puppet_running_on`, beaker would try to back up the
old `puppet.conf`, warn that it didn't exist:

Warning: Could not backup file '/etc/puppet/puppet.conf': no such file

Then it would try to read in the old `puppet.conf`, to apply the new
settings on top, but that failed with:

cat: /etc/puppet/puppet.conf: No such file or directory

This commit updates the setup step to ensure the parent directory and
puppet.conf both exist.

The sslv2_downgrade_master test had to be updated to handle the case
where there are no suitable agents, e.g. windows agent doesn't have
openssl in its PATH, and the master doesn't have an agent.

The ticket_3360_allow_duplicate_csr_with_option_set test required at
least one non-Windows agent. It was last updated a long time ago when
facter on windows didn't support the fqdn fact. The test also wasn't
using the `puppet` helper method that prefixes the command with
`cmd.exe /c`.