Commit graph

12 commits

Author SHA1 Message Date
Morgan Haskel
61080fb676 Unbreak broken tests 2015-02-15 09:39:17 -08:00
Martin Seener
93567aef4a apt::force: Added 2 parameters for automatic configuration file handling; fixes #modules-1306
when updating or installing newer packages with apt::force and you have changed previous
configuration files aptitude or apt-get will prompt what to do. You can suppress that
by pre-define the action with cfg_files parameter (new, old or unchanged and its backward
compatible if not defined). With a second optional parameter cfg_missing you can force
your provider to install missing configuration files as well.

Signed-off-by: Martin Seener <martin@seener.de>

apt::force: Changed selectors used in force.pp to case statements; refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>

apt::force: rspec: fixed the failing tests and added validate_re for cfg_files and validate_bool for cfg_missing. Also removed default values for both case statements and only allow pre-defined values or true/false. Furthermore enhanced the README refs #module-1306

Was able to fix the failing rspec tests for the patch.
Thanks to Morgan Haskel.

Signed-off-by: Martin Seener <martin@seener.de>

Despite the puppetlabs-stdlib documentation says validation_re supports 3 arguments the tests failed telling that only 2 are supported. Fixed this by removing the 3 optional argument; refs #modules-1306

Signed-off-by: Martin Seener <martin.seener@barzahlen.de>

apt::force: updated readme refs #module-1306

Signed-off-by: Martin Seener <martin@seener.de>
2014-09-22 19:53:45 +02:00
Morgan Haskel
d6bdb4d925 Cleaned up unit tests. 2014-08-04 19:44:19 -04:00
Ashley Penney
4d188443bc Add lsbdistid facts where appropriate. 2014-02-24 22:31:16 +00:00
Hunter Haugen
4b8aa9e55a Revert "Undo backwards-incompatible changes and features."
This reverts commit f9e2fe2a7c.
2014-02-14 14:49:43 -08:00
Hunter Haugen
f9e2fe2a7c Undo backwards-incompatible changes and features.
Undoes the parameter changes in #140 and #184
2014-02-14 14:33:30 -08:00
Hunter Haugen
711420739d Update specs to test all parameter cases 2013-07-03 13:11:18 -07:00
Thomas Spalinger
7c66ab5f39 fixed test for changing aptitude to apt-get 2013-07-02 21:59:26 +02:00
Matthaus Litteken
d522877cdd (#12094) Replace chained .with_* with a hash
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.
2012-02-08 09:24:43 -08:00
Matthaus Litteken
2d688f4cdc (#12094) Add rspec-puppet tests for apt
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).
2012-01-23 13:37:42 -08:00
Matthaus Litteken
f759bc039a (#11953) Apt::force passes $version to aptitude
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.
2012-01-13 15:29:47 -08:00
Dan Bode
f71db53130 (#11413) Add spec test for apt::force to verify changes to unless
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.
2012-01-13 12:04:09 -08:00