Age | Commit message (Collapse) | Author |
|
rspec-puppet matchers are defined for tests which exist in
spec/functions, but the function unit tests lived in
spec/unit/puppet/parser/functions. This moves them to the correct place
for using rspec-puppet
|
|
|
|
Without this patch one can not specify package resource specific
parameters. All the ensure_packages() function does it makes sure
the named packages are installed. This patch allows one to pass
default as a second argument and allow greater flexibility on
packages installations.
Use case like the following are now possible :
* ensure_packages(['r10k', 'serverspec'], {'provider' => 'gem'})
* ensure_packages(['ntp'], {'require' => 'Exec[foobar]'})
|
|
This work updates a number of Gems to the latest versions (rspec,
rspec-puppet), and updates and tweaks a bunch of tests to work
with the updated gems.
|
|
The previous behavior of the tests checked the behavior of the
underlying functions library when called with no arguments; this commit
updates the tests to conform to the functions API and test what happens
when a function is called with no args.
|
|
|
|
Without this patch the stdlib spec tests are failing against recent
versions of Puppet. The root cause of this problem is a change in the
behavior of create_resources in Puppet 6baa57b. The change in behavior
caused the :name key to be omitted from the hash returned by
Puppet::Parser::Resource#to_hash which in turn is causing the test
failure.
This patch addresses the problem by updating the test to match the
description of the example. Only the attribute :ensure is checked
instead of the full hash itself.
|
|
Without this patch the ensure_packages() function has no rspec behavior
examples. This patch fixes the problem by filling out a spec file with
expected behaviors I could think of.
|