diff options
| author | Paul Lathrop <plathrop@digg.com> | 2010-04-06 16:23:03 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 2fae0bded559a23dcab5338dd899e272e0d0678e (patch) | |
| tree | 4eda099e7dca9c3dd4f17f75fe014e7d07445717 /spec/unit | |
| parent | b10d35d0da8f630e004966a52ac3ecd01287d36c (diff) | |
| download | puppet-2fae0bded559a23dcab5338dd899e272e0d0678e.tar.gz puppet-2fae0bded559a23dcab5338dd899e272e0d0678e.tar.xz puppet-2fae0bded559a23dcab5338dd899e272e0d0678e.zip | |
Fixes #1999 - Allows the 'apt' provider to downgrade packages.
This is accomplished by adding the --force-yes option to the apt-get
command line when a package version is specified.
Signed-off-by: Paul Lathrop <plathrop@digg.com>
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/provider/package/apt.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/provider/package/apt.rb b/spec/unit/provider/package/apt.rb index 25d74bf90..861029838 100755 --- a/spec/unit/provider/package/apt.rb +++ b/spec/unit/provider/package/apt.rb @@ -109,6 +109,13 @@ Version table: @provider.install end + it "should use --force-yes if a package version is specified" do + @resource.expects(:[]).with(:ensure).returns "1.0" + @provider.expects(:aptget).with { |*command| command.include?("--force-yes") } + + @provider.install + end + it "should do a quiet install" do @provider.expects(:aptget).with { |*command| command.include?("-q") } |
