puppetlabs/puppet — pull request #3421 by joshcooper (2014-12-17 01:14:19+00:00)
Title: (PUP-3378) Don't require puppet resource service output to be the same

Previously, the acceptance test would execute `puppet resource service`
twice, and compare the output to ensure puppet did not change the state
of the system. This was done because in the past the `init` service
provider would invoke the status command on all scripts in /etc/init.d,
including /etc/init.d/reboot.sh, which would unconditionally reboot the
system[1]

However, this test is not reliable as some platforms like fedora 19 &
20 have services that change state between the two puppet runs, e.g.
NetworkManager-dispatcher.service, and this behavior is unrelated to
puppet.

This commit removes the requirement that the `puppet resource service`
command be identical. We continue to execute `puppet resource service`
twice and compare the output of the ssh(d) service. We also have specs
to ensure that the `init` service's instances method excludes dangerous
scripts.

This commit also changes the test to use beaker's `puppet` DSL method,
which is the preferred way of executing puppet in acceptance tests.

[1] http://projects.puppetlabs.com/issues/14615

Paired-with: Eric Thompson