HomePhorge

(#12412) Refactor puppet_resource('exec')
6201ecdb5052Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#12412) Refactor puppet_resource('exec')

Previously, the exec tests did not run on Windows, because they tried
using Unix utilities within an exec resource, e.g. /bin/touch.

This commit uses the exec methods on the agent instances instead to
generate an appropriate command for that platform. In the process, it
also uncovered an issue whereby multi-line commands don't work on
Windows (#9996). This is because Windows doesn't support a shell exec
provider, and so this test is skipped on Windows agents.

The should_run_command test also demonstrates a known race condition
in Windows (#11740) which can cause the child process to exit before
the parent has a chance to get its exit code. This test will warn on
Windows agents, and once #11740 is fixed, we can re-enable the
acceptance test.

Details

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

Event Timeline

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