puppetlabs/puppet — pull request #2499 by jpartlow (2014-04-03 23:08:06+00:00)
Title: (PUP-1433) Ignore deprecation warnings in module acceptance output

Our Debian packages are released with a puppet.conf that includes the
now deprecated 'templatedir' setting. This causes a large number of
deprecation warnings to appear in the test output. Since removing the
templatedir setting (which is to the non-default $confdir/templates)
would change the installation for anyone upgrading who had never altered
their puppet.conf, we have to leave the setting in place.

Many of the puppet module tool, and a few other acceptance tests, were
testing all of the output, and thus were sensitive to the sudden
appearance of the deprecation warning in their output.

This commit changes the output checking to ignore extraneous stderr
output.

1) Calls to "assert_equal '', stderr" have been removed, because
an actual error should change the exit code and be caught by Beaker
failing due to non-zero exit code.

2) Assertions against all output which were only testing stdout output
have been changed to only check stdout output. (Deprecation warnings
are emitted on stderr).

3) Assertions which were testing both stdout and stderr (for module
error output), have been altered to use regexp's to ignore extra
warnings.

4) Assertions against stderr have been changed to use regexp as well for
the same reason as #3