puppetlabs/puppet-acceptance — pull request #120 by joshcooper (2012-01-21 21:19:56+00:00)
Title: (#11743) Delete contents of agent var directory in agent/master tests

Previously, the
`helpful_error_message_when_hostname_not_match_server_certificate`
test would correctly report that the server's hostname didn't match
its certificate, however, the test would attempt to use a cached
catalog. If one was present, for example, the 03_ValidateSignCert step
causes the agent to retrieve an empty catalog, then the agent would
apply the catalog and return exit code 0, causing the test to fail.

This commit deletes the contents of the agents' vardir, but not the
vardir itself. This change will only affect tests that use the
`with_master_running_on` method and that define the `puppetvardir`
property for the host, which PE hosts do not.