From d059cc2668f284a7db77a15d1d742326d464e963 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 5 Sep 2014 12:03:28 +0200 Subject: Fix incorrect upgradable listing in "apt list" (thanks to Michael Musenbrock) The "apt list" command was using only the pkgDepCache but not the pkgPolicy to figure out if a package is upgradable. This lead to incorrect display of upgradable package when the user used the policy to pin-down packages. Thanks to Michael Musenbrock for the initial patch. Closes: #753297 --- test/integration/test-bug-753297-upgradable | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 test/integration/test-bug-753297-upgradable (limited to 'test/integration/test-bug-753297-upgradable') diff --git a/test/integration/test-bug-753297-upgradable b/test/integration/test-bug-753297-upgradable new file mode 100755 index 000000000..068704b3e --- /dev/null +++ b/test/integration/test-bug-753297-upgradable @@ -0,0 +1,34 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +cat > rootdir/etc/apt/preferences < Date: Thu, 23 Oct 2014 11:37:49 +0200 Subject: tests: support 'installed' release in insertpackage It is sometimes handy to have an installed package also in the archive, but this was until now harder than it should as you had to duplicate the lines, which is especially dangerous while writing the tests as it easily happens that these two lines divert and so the same-but-different version detection kicks in. Git-Dch: Ignore --- test/integration/test-bug-753297-upgradable | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/integration/test-bug-753297-upgradable') diff --git a/test/integration/test-bug-753297-upgradable b/test/integration/test-bug-753297-upgradable index 068704b3e..01395a095 100755 --- a/test/integration/test-bug-753297-upgradable +++ b/test/integration/test-bug-753297-upgradable @@ -16,8 +16,7 @@ Pin: release unstable Pin-Priority: 1 EOF -insertinstalledpackage 'foo' 'all' '1' -insertpackage 'testing' 'foo' 'all' '1' +insertpackage 'testing,installed' 'foo' 'all' '1' insertpackage 'testing-updates' 'foo' 'all' '2' insertpackage 'unstable' 'foo' 'all' '3' -- cgit v1.2.3 From 25b86db159fbc3c043628e285c0c1ef24dec2c6e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 Mar 2015 00:59:44 +0100 Subject: test exitcode as well as string equality We use test{success,failure} now all over the place in the framework, so its only consequencial to do this in the situations in which we test for a specific output as well. Git-Dch: Ignore --- test/integration/test-bug-753297-upgradable | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration/test-bug-753297-upgradable') diff --git a/test/integration/test-bug-753297-upgradable b/test/integration/test-bug-753297-upgradable index 01395a095..53bf3361b 100755 --- a/test/integration/test-bug-753297-upgradable +++ b/test/integration/test-bug-753297-upgradable @@ -25,9 +25,9 @@ insertpackage 'testing' 'bar' 'all' '2' setupaptarchive -testequal "Listing... +testsuccessequal "Listing... bar/testing 2 all [upgradable from: 1]" apt list --upgradable -testequal "Listing... +testsuccessequal "Listing... bar/testing 2 all [upgradable from: 1] foo/testing,now 1 all [installed]" apt list -- cgit v1.2.3