(#16430) acceptance: refactor zone tests

This patch adds new tests to zones, and corrects the earlier zone test cases
so that they take less time by eliminating redundant operations, and making
the zone creation use the default zpool
(#16430) acceptance: refactor cron tests

Changes:
- This patch refactors the cron tests and moves the common code to common_utils.
- This also adds test cases that checks for idempotence and array handling.
- It also removes the randomized users created, and uses a fixed user 'tstuser'
  for cron creation. This was done because using a randomized name such as plddddd
  did not buy us any thing while using a fixed user name gives us better
  predictability on the requirements of system under test
  (mainly that tstuser should be absent).
(#16430) acceptance: refactor package ips

Changes:
- Refacors ips_basic_tests,
- Add test cases for new functionalities versionable and holdable
(#16430) refactor smf tests

This patch refactors smf tests and adds a couple of new tests.
(#16430) refactor zfs tests

This patch refactors the zfs tests and adds extra test cases.
(#16430) refactor zpool test cases.

This patch refactors zpool test cases, and adds a couple of extra tests.
Merge pull request #1155 from vrthra/acceptance/3.x/16430_maint_refactor_solaris_tests

(#16430) maint refactor solaris tests
Commit refactors the solaris test cases.
Fix issue with chown failing in test.

A chown is performed while testing for autoflush and this fails when the
file does not exist. This is by design in the test, the File.open is
stubbed to not create the file. By also stubbing chown, the test is
green.
Maint: Clear global state between tests

Previously, the tests would fail when invoked when random seed 3366,
because of global state associated with the Basetest face application,
in particular, option_parser_commands, which contained the list of valid
commands from the previous test.

This commit adds a method to clear application global state. Note that
the state is not associated with Puppet::Application, but the subclass
that the test defines, which is why test_helper doesn't call it.
Maint: Clear memory instances

Previously, the test would fail when invoked with random seed 3366,
because the `instances` variable associated with the memory terminus was
not cleared between tests. As a result, the test that expected not to
find any data, would fail.

Note the test_helper only restores the indirections' cache_class and
terminus_class. It does not save/restore the indirections' termini or
any data maintained by the termini.

This commit ensures the memory termini's instances variable is cleared
between runs.
Maint: Clear parsedfile target and default_target

Previously, the `target` and `default_target` class variables were not
cleared between tests causing order-dependent test failures.
Maint: Don't overwrite outer sum variable

Previously, these tests failed with random seed 3366, because one of the
tests declared a block whose inner variable overwrote the outer variable
with the same name. So a subsequent test that expected sum to be :md5
would fail.

This commit just changes the inner block variable to not collide with
the outer one.
Maint: Ensure manages_password_age feature is set

Previously, the test would fail with random seed 31725 on systems where
the manages_password_age feature is not enabled by default. This
occurred because one of the tests was declaring the useradd provider
supported the manages_password_age feature, which seems to have global
scope. Rather than try to debug that now, I've updated the other tests
that rely on the manages_password_age feature being present to follow
the same pattern.
Merge pull request #1164 from joshcooper/maint/3.x/order-dependent-failures

Maint: Fix order dependent spec tests
(#3757) Rename agent_pidfile to agent_catalog_run_lockfile

Without this patch it is very confusing what the intended purpose of the
agent_pidfile setting is.  This confusion may lead to people thinking
this file is intended to be used my monitoring systems or service
management frameworks to determine the PID of a running puppet agent
process.  This thinking is incorrect, the `pidfile` setting is intended
for this purpose.

The `agent_pidfile` setting is intended to provide mutual exclusion of
configuration catalog runs.  This patch reduces confusion by more
closely matching the name and description to the intent.

In addition, the prose in the descriptions and comments have been
augmented to make it clear "running agent" refers to an agent performing
a configuration catalog run and not simply the running agent process.
(Maint) Improve error message when catalog run is in progress

When a catalog run is currently in progress, or the `puppet agent
--configprint agent_catalog_run_lockfile` is stale, the error message
looks like this:

    Run of Puppet configuration client already in progress; skipping

This is a problem because if the system is deadlocked from a stale file,
it's not clear what file needs to be removed.  This patch improves the
error message to be:

    Run of Puppet configuration client already in progress; skipping \
      (/var/lib/puppet/state/agent_catalog_run.lock exists)

A new method has been added to make it easy to print out the file being
referenced by the `running?` method.
Merge branch 'bug/3.x/3757_rename_agent_pidfile_to_agent_catalog_run_lockfile' into 3.x

* bug/3.x/3757_rename_agent_pidfile_to_agent_catalog_run_lockfile:
  (Maint) Improve error message when catalog run is in progress
  (#3757) Rename agent_pidfile to agent_catalog_run_lockfile
Merge branch '3.x'

* 3.x:
  (Maint) Improve error message when catalog run is in progress
  (#3757) Rename agent_pidfile to agent_catalog_run_lockfile
  Maint: Ensure manages_password_age feature is set
  Maint: Don't overwrite outer sum variable
  Maint: Clear parsedfile target and default_target
  Maint: Clear memory instances
  Maint: Clear global state between tests
  Fix issue with chown failing in test.
  (#16430) refactor zpool test cases.
  (#16430) refactor zfs tests
  (#16430) refactor smf tests
  (#16430) acceptance: refactor package ips
  (#16430) acceptance: refactor cron tests
  (#16430) acceptance: refactor zone tests