Age | Commit message (Collapse) | Author | Files | Lines |
|
We do not have to stub the `command` method anymore because it is
nevery called directly. It is only called through the wrapper method
`pkginfo` which we already stub in the specs.
|
|
The pkginfo method is automatically created for us and provides a nice
wrapper around execute so prefer that one over building your own execute
method invocation. Please not that the buildin method does already set
combine to true so we are able to parse error messages
|
|
pkginfo was previously executed with combine => false so stderr was
discarded. This way puppet was unable to detect any errors the pkginfo
might print, especially the message `ERROR: information for
"some_package" was not found`.
As a result the provider failed every time it tries to check the current
state of an absent package.
|
|
Previously, many providers called Puppet::Util.execute with an
argument(s), which had the side-effect of defaulting failonfail and
combine to false.
This commit does not change any behavior. Instead in places where
execute is called with arguments, it explicitly sets failonfail and/or
combine to false. This way it's less confusing as to what the provider
is doing.
|
|
Without this patch Ruby 1.9 is still complaining loudly about trying to
parse the spec files. The previous attempt to clean up this problem in
edc3ddf works for Ruby 1.8 but not 1.9.
I'd prefer to remove the shebang lines entirely, but doing so will cause
encoding errors in Ruby 1.9. This patch strives for a happy middle
ground of convincing Ruby it is actually working with Ruby while not
confusing it to think it should exec() to rspec.
This patch is the result of the following command run against the source
tree:
find spec -type f -print0 | \
xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
|
|
Before implementing this feature, pkgadd solaris could not specify {
install_options=>options } as extra options in package manifest for
puppet. This checkin adds the :install_option feature to the provider
which enables the use of { install_options=> options } parameter. This
checkin also adds the test cases for this feature.
|
|
Modified the spec test to use the `described_class` method of the
example group. Also simplified how the `resource` and `provider` were
declared in the `let` blocks.
|
|
This commit adds tests to ensure that the sun package provider features
are correct: installable, uninstallable, and upgradeable, but not
versionable.
|
|
Previously the execpipe method used to return an array as output, which
if the child exit status was non-zero, caused an exception to be raised
with the array as the error message, instead of a string.
Also, previously, we relied on exception handling to know when a package
is not present. But there are cases where no exception is raised, but
the package output has an 'ERROR' string.
This commit changes from `execpipe` to `execute`, which will raise an
exception with the output of the `pkginfo` command. It also explicitly
looks for an 'ERROR' string in the package output.
This commit also refactors the duplicate namemap so that it is defined
only once, and removes the nil entries so that only keys of interest are
retained.
It also adds fixtures and spec tests for the provider.
|