(#20308) Add failing test for incomplete file list

Under certain circumstances the fileset will drop subdirectories from its
results. This adds a test showing this failure.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Make more of Fileset private

Several of the public methods on fileset only seemed to be there for
testing. There is no need for this as the behavior of the file listing
already checks the conditions controlled by those internal methods.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Fix dropping paths from fileset results

This fixes the issue in #20308 where some paths get dropped from the fileset
results. When a directory contained both subdirectories and files, and the
last entry was a file, it could cause the recursion to exit early. This
removes the complexity of tracking the next recursion level separately.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Refactor fileset recursion for clarity

The previous expression of the algorithm for traversing the file structure and
producing the available files was hard to understand and therefore error prone
(see the bug that is being fixed here). This refactors it to be better
separated and should be easier to see any problems in it.

Another part of the cleanup was to make checks against the filesystem more
explicit: either the path is valid or not, whether the path is a directory.

Paired-with: Andrew Parker <andy@puppetlabs.com>
(#20308) Clean up the fileset specs

Paired-with: Andrew Parker <andy@puppetlabs.com>
Merge remote-tracking branch 'pcarlisle/ticket/20308-file-serving-recursion' into stable

* pcarlisle/ticket/20308-file-serving-recursion:
  (#20308) Clean up the fileset specs
  (#20308) Refactor fileset recursion for clarity
  (#20308) Fix dropping paths from fileset results
  (#20308) Make more of Fileset private
  (#20308) Add failing test for incomplete file list
(#20308) Fix fileset spec for Windows
(#20308) Try again to fix fileset tests on Windows
Revert "Merge branch 'nicklewis-rcS-is-a-jerk' into stable"

This reverts commit ea548f68bac581d1d0a2e2e95738d73f658b3896, reversing
changes made to d6e6e9d51a92cba2e5dcace4b48949d1f77663b9.

Reverting because the acceptance tests is failing :(

https://jenkins.puppetlabs.com/view/Puppet%20FOSS/view/Master/job/Puppet%20Acceptance%20(master)/label=acceptance,platform=centos/767/console
(#20302) Fix failing acceptance test for windows providers

Without this patch the windows acceptance test
ticket_6907_use_provider_in_same_run_it_becomes_suitable is failing on
windows because the behavior that determines of a file is a command or
not, and thus if the provider is suitable or not behaves differently on
Windows than it does on *nix.  This difference in behavior is caused by
Windows determining execute ability by inspecting the PATHEXT
environment variable, and a file with no extension will not be
considered executable.

This problem will not be observed in MRI 1.8.7 because File.executable?
always returns true for any file that exists.  The problem will be
observed in MRI 1.9.3 because this behavior changed in
http://bugs.ruby-lang.org/issues/show/2135

This patch addresses the problem by changing the file to have an exe
extension.  This makes the test agnostic to the underlying behavior of
windows or Unix.
Merge branch 'fix_20302_test' into stable

* fix_20302_test:
  (#20302) Fix failing acceptance test for windows providers

closes #1621
Revert "Revert "Merge branch 'nicklewis-rcS-is-a-jerk' into stable""

This reverts commit dd4d41e97fe21c9bd9f628fb4f982aead04cc213.
(maint) Handle different ssh service names in `puppet resource service` test

This test was using a regex to match the output for the ssh/sshd service
from puppet resource, but was explicitly invoking the command with the
name ssh. Since we can check the state of that service from the list of
all instances (in which case the regex is actually beneficial), there's
no need to look at the specific service separately. This combines the
two steps, and makes the test more robust to different names for the ssh
service.