summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider/exec
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '2.7.x'Nick Lewis2011-08-161-3/+5
|\
| * Fix posix exec provider spec failures on WindowsNick Lewis2011-08-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These specs were assuming that paths such as /foo were always absolute, which is not the case on Windows. Thus, when run on Windows, the provider was complaining about receiving relative paths when it expected absolute, rather than succeeding or failing in the intended way. Now we expand all paths we want to be absolute, to guarantee they will be absolute everywhere. Also, some specs were failing because they were trying to test the case where a file isn't executable. That's not something we can reliably check on Windows, so instead just stub the appropriate executable? methods. Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* | Merge branch '2.7.x'Nick Lewis2011-08-161-105/+104
|\| | | | | | | | | | | Conflicts: lib/puppet/provider/augeas/augeas.rb spec/unit/node_spec.rb
| * (#5495) Remove dead Windows-specific code from posix exec providerNick Lewis2011-08-161-105/+104
| | | | | | | | | | | | | | | | | | | | | | | | Because this provider only applies when the posix feature is present (and thus not the windows feature), it can never be used on Windows. Thus, the Windows-specific command handling is unnecessary and unused. Also added more specific error messages for the cases where a command doesn't exist, isn't a file, and isn't executable. These only apply when the command path is absolute (otherwise the message is simply command not found). Reviewed-By: Matt Robinson <matt@puppetlabs.com>
* | (#8663) Disable spec tests for unsupported functionality on WindowsJosh Cooper2011-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The mount, shell, and ssh_authorized_key types are not supported on Windows, so these spec tests have been disabled when running on Windows. One of the compiler spec tests fails on Windows because Puppet::Util.execute attempts to execute a program named "git rev-parse HEAD". This has different semantics than Unix, where the command is splatted, Kernel.exec(*command). Since this truly is a Windows bug, I removed the fails_on_windows tag and updated ticket #8410. Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* | Maint: Tagged spec tests that are known to fail on WindowsJosh Cooper2011-07-191-1/+1
|/ | | | | | | | | | | | Many spec tests fail on Windows because there are no default providers implemented for Windows yet. Several others are failing due to Puppet::Util::Cacher not working correctly, so for now the tests that are known to fail are marked with :fails_on_windows => true. To skip these tests, you can run: rspec --tag ~fails_on_windows spec Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
* maint: clean up the spec test headers in bulk.Daniel Pittman2011-04-132-2/+2
| | | | | | | We now use a shebang of: #!/usr/bin/env rspec This enables the direct execution of spec tests again, which was lost earlier during the transition to more directly using the rspec2 runtime environment.
* maint: just require 'spec_helper', thanks rspec2Daniel Pittman2011-04-082-2/+2
| | | | | | | | | | | rspec2 automatically sets a bunch of load-path stuff we were by hand, so we can just stop. As a side-effect we can now avoid a whole pile of stupid things to try and include the spec_helper.rb file... ...and then we can stop protecting spec_helper from evaluating twice, since we now require it with a consistent name. Yay. Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
* (#4884) Modify tests to pass on non-OS X systemsMax Martin2011-03-181-1/+1
| | | | | | | | | Fixed problems with the spec tests for the new exec type and providers that were causing failures on non-OS X systems. This involved rearranging some of the tests and their describe blocks, which makes the diff look more dramatic than it really is. Paired-with:Matt Robinson, Jacob Helwig
* (#4884) Revise new exec tests, add a few moreMax Martin2011-03-172-10/+21
| | | | | | | | Revised a few of the new tests for the exec type and provider to ensure that they were testing what they meant to, and added in a couple of new tests. Reviewed-by:Daniel Pittman
* (#4884) Add an shell provider for execsMatt Robinson2011-03-151-0/+44
| | | | | | | This makes it possible to use shell builtins when the exec is inline bash commands. Paired-with: Max Martin
* (#4884) Break the exec type out to have a posix providerDaniel Pittman2011-03-151-0/+115
This is in preparation for allowing other new providers to handle exec commands differently. Reviewed-by: Max Martin and Matt Robinson