This commit adds unit tests to validate that the
apt proxy is configured as expected when the class
parameter proxy_host is set as a class parameter for
the apt class.
The hash passing to the with method is cleaner and closer to puppet code, so
all of the with_$param have been replaced with with($hash). This also
includes two minor whitspace changes to unstable.pp and source.pp.
This also replaces the ternary switch on param_set with a hash merge,
which is cleaner and will support more use cases.
Rspec no longer uses the spec.opts file, and this particular file also uses
options for rspec that are no longer honored or available, like loadby. So this
commit removes the file. Users that want to customize rspec behavior should use
a .rspec file in the repository root or in their home directory.
This commit adds full coverage for the apt module as it currently exists. It
adds rspec-puppet tests for the defines (apt::builddep, apt::force, apt::pin,
apt::ppa, apt::source) and classes (apt, debian::testing, debian::unstable,
apt::params, apt::release).
Previously, even if $version were passed to apt::force, aptitude would just
install the default version of the package available. This updates the aptitude
call to use the version string if it exists. If no version is passed, or if it
is false, no version is added to the aptitude call. This also updates the
rspec-puppet tests for the define, to reflect the changes to the exec.
In the Previous commits, the query being done by the
apt::force install command was not strict enough and
could lead to false positives.
These queries represented by the unless parameter have been
resolved in another commit. This commit accompanies that commit
and adds basic unit tests to correspond to the changes.
This commit adds test coverage for apt::ppa.
This test coverage is suficient to verify the
code changes that resolve the issue with
aptitude update not being called when ppas were
added (#10451).