puppetlabs/puppet-acceptance — pull request #126 by joshcooper (2012-01-31 20:35:23+00:00)
Title: (#11944) Separate native command logic from acceptance tests

Previously, many of the acceptance tests used native commands to verify that puppet_resource was correctly making changes to the system. However, the native commands were specific to Linux, and inconsistently duplicated across multiple acceptance tests.

This commit refactors the native command logic into one module for each supported agent platform and resource type. For example, there are Host::Unix::User and Host::Windows::User modules that know how to execute native commands on the system to create, get, modify, etc users. Each module is then included into its parent host, e.g. `Host::Unix`, so that commands can be executed on the host and results returned, e.g. `users = agent.user_list`

The goal of these changes is not to re-invent puppet. Instead, we want to validate that puppet_resource works, and that its output can be trusted to validate other acceptance tests. For example, given a manifest containing a user and group resources, an acceptance test should be able to use puppet_resource to validate that the manifest was applied correctly in a cross-platform way.

This commit does not modify any acceptance tests, as they reside in various repos. This commit just lays the foundation for common agent acceptance tests to execute on all supported platforms.