HomePhorge

(#12412) Refactor puppet_resource('group') tests
fb28ce0337b0Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#12412) Refactor puppet_resource('group') tests

Previously, the Linux-specific logic for validating
puppet_resource('group') was contained within each 'group' test case. In
order to support executing resource acceptance tests on non-Linux
agents, I could have added if-then-else statements to each test case,
though that would lead to logic-sprawl.

This commit refactors the existing set of 'group' acceptance tests to
use native commands to validate that the tests work on any supported
agent platform. Specifically, that puppet_resource('group') can create,
delete, query, and query_all, and that it doesn't try to
delete a non-existent group, or add a group that already exists.

The goal of these tests is to validate that puppet_resource "works"
with group resources, and can therefore be trusted to validate the
results of subsequence acceptance tests.

The commit also preserves tests that exercise unique behaviors,
e.g. should_modify_gid.rb.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU85fd6901cd80: (#12412) Refactor puppet_resource('user') tests
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUfb28ce0337b0: (#12412) Refactor puppet_resource('group') tests (authored by Josh Cooper <josh@puppetlabs.com>).Feb 6 2012, 6:41 PM