summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2022-06-30 13:20:45 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2022-06-30 13:21:19 +0200
commit8416bcb58cba0f8b5e8e8d26b71ae838f228111d (patch)
tree677c523dcc54cd3da7392d3daf3de606641cf9ab
parent23fe896858dfc7857f2d59c5fd7627332f11c1ff (diff)
test-phased-updates-upgrade: Tests with arguments
Pass some package names to upgrade to see that that works Gbp-Dch: ignore
-rwxr-xr-xtest/integration/test-phased-updates-upgrade70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/integration/test-phased-updates-upgrade b/test/integration/test-phased-updates-upgrade
index ab39681de..887995893 100755
--- a/test/integration/test-phased-updates-upgrade
+++ b/test/integration/test-phased-updates-upgrade
@@ -142,6 +142,61 @@ The following packages will be upgraded:
Inst phased-security [1] (3 unstable-updates [all])
Conf phased-security (3 unstable-updates [all])" aptget upgrade -s -q
+for upgrade in "dist-upgrade" "upgrade --with-new-pkgs"; do
+testsuccessequal "Reading package lists...
+Building dependency tree...
+Calculating upgrade...
+The following NEW packages will be installed:
+ phased-new
+The following packages have been kept back:
+ phased
+The following packages will be upgraded:
+ depends-phased-dep depends-phased-new phased-dep phased-security
+4 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
+Inst phased-dep [1] (3 unstable-updates [all])
+Inst depends-phased-dep [1] (3 unstable-updates [all])
+Inst phased-new (3 unstable-updates [all])
+Inst depends-phased-new [1] (3 unstable-updates [all])
+Inst phased-security [1] (3 unstable-updates [all])
+Conf phased-dep (3 unstable-updates [all])
+Conf depends-phased-dep (3 unstable-updates [all])
+Conf phased-new (3 unstable-updates [all])
+Conf depends-phased-new (3 unstable-updates [all])
+Conf phased-security (3 unstable-updates [all])" aptget $upgrade -s -q depends-phased-dep
+done
+
+testsuccessequal "Reading package lists...
+Building dependency tree...
+Calculating upgrade...
+The following packages have been kept back:
+ depends-phased-new phased
+The following packages will be upgraded:
+ depends-phased-dep phased-dep phased-security
+3 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
+Inst phased-dep [1] (3 unstable-updates [all])
+Inst depends-phased-dep [1] (3 unstable-updates [all])
+Inst phased-security [1] (3 unstable-updates [all])
+Conf phased-dep (3 unstable-updates [all])
+Conf depends-phased-dep (3 unstable-updates [all])
+Conf phased-security (3 unstable-updates [all])" aptget upgrade -s -q depends-phased-dep
+
+# install does not respect phasing
+testsuccessequal "Reading package lists...
+Building dependency tree...
+The following additional packages will be installed:
+ phased-dep
+The following packages will be upgraded:
+ depends-phased-dep phased phased-dep phased-security
+4 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
+Inst phased-dep [1] (3 unstable-updates [all])
+Inst depends-phased-dep [1] (3 unstable-updates [all])
+Inst phased [1] (3 unstable-updates [all])
+Inst phased-security [1] (3 unstable-updates [all])
+Conf phased-dep (3 unstable-updates [all])
+Conf depends-phased-dep (3 unstable-updates [all])
+Conf phased (3 unstable-updates [all])
+Conf phased-security (3 unstable-updates [all])" aptget install -s -q phased depends-phased-dep phased-security
+
msgmsg "Testing with policy based implementation"
echo 'APT::Get::Phase-Policy "1";' > rootdir/etc/apt/apt.conf.d/phase-by-policy
@@ -254,3 +309,18 @@ The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Inst phased-security [1] (2 unstable-security [all])
Conf phased-security (2 unstable-security [all])" aptget upgrade -s -q
+
+# FIXME: We actually would like this to work I think?
+for upgrade in "dist-upgrade" "upgrade --with-new-pkgs" "upgrade" "install"; do
+ testfailure aptget $upgrade -s -q depends-phased-dep
+ testsuccess grep "depends-phased-dep : Depends: phased-dep (= 3) but 1 is to be installed" rootdir/tmp/testfailure.output
+done
+
+testsuccessequal "Reading package lists...
+Building dependency tree...
+phased is already the newest version (1).
+The following packages will be upgraded:
+ phased-security
+1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
+Inst phased-security [1] (2 unstable-security [all])
+Conf phased-security (2 unstable-security [all])" aptget install -s -q phased phased-security