summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-12 10:35:49 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:19 +0200
commit7414af7fa88164209eec9c585b8d175c1618ecbc (patch)
tree2a582637043bd8c57d43bf8b193dd9ecb479d559 /test
parent7c4f1ca5fe315a8223570b05994d6d7ca7c55c4f (diff)
various changes to increase test-coverage
And of course, testing obscure things ends up showing obscure 'bugs' or better shortcomings/inconsitencies, so lets fix them with the tests. Git-Dch: Ignore
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework37
-rwxr-xr-xtest/integration/test-apt-cache1
-rwxr-xr-xtest/integration/test-apt-get-build-dep47
-rwxr-xr-xtest/integration/test-apt-get-clean1
-rwxr-xr-xtest/integration/test-apt-helper3
-rwxr-xr-xtest/integration/test-apt-sources-deb82253
-rwxr-xr-xtest/integration/test-external-dependency-solver-protocol13
-rwxr-xr-xtest/integration/test-pdiff-usage8
8 files changed, 102 insertions, 61 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 3bf6012ba..322c74a21 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -1592,29 +1592,30 @@ testfailure() {
msggroup
}
-testsuccessequal() {
- msggroup 'testsuccessequal'
- local CMP="$1"
- shift
- testsuccess "$@"
- testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" "$CMP"
+testreturnstateequal() {
+ local STATE="$1"
+ msggroup "${STATE}equal"
+ if [ "$2" != '--nomsg' ]; then
+ local CMP="$2"
+ shift 2
+ "$STATE" "$@"
+ testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/${STATE}.output" "$CMP"
+ else
+ local CMP="$3"
+ shift 3
+ "$STATE" --nomsg "$@"
+ testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/${STATE}.output" "$CMP"
+ fi
msggroup
}
+testsuccessequal() {
+ testreturnstateequal 'testsuccess' "$@"
+}
testwarningequal() {
- msggroup 'testwarningequal'
- local CMP="$1"
- shift
- testwarning "$@"
- testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testwarning.output" "$CMP"
- msggroup
+ testreturnstateequal 'testwarning' "$@"
}
testfailureequal() {
- msggroup 'testfailureequal'
- local CMP="$1"
- shift
- testfailure "$@"
- testfileequal "${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output" "$CMP"
- msggroup
+ testreturnstateequal 'testfailure' "$@"
}
testfailuremsg() {
diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache
index 7927686fc..c254aa602 100755
--- a/test/integration/test-apt-cache
+++ b/test/integration/test-apt-cache
@@ -34,6 +34,7 @@ testempty aptcache unmet dpkg
testsuccess aptcache stats
cp rootdir/tmp/testsuccess.output stats.output
testsuccess test -s stats.output
+testfailureequal 'E: apt-cache stats does not take any arguments' aptcache stats foo
testsuccess aptcache xvcg foo
cp rootdir/tmp/testsuccess.output xvcg.output
testsuccess test -s xvcg.output
diff --git a/test/integration/test-apt-get-build-dep b/test/integration/test-apt-get-build-dep
index f7af5b782..6df49d782 100755
--- a/test/integration/test-apt-get-build-dep
+++ b/test/integration/test-apt-get-build-dep
@@ -5,12 +5,15 @@ TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
-configarchitecture "i386"
+configarchitecture 'i386'
-buildsimplenativepackage 'debhelper' 'i386' '7' 'stable'
-buildsimplenativepackage 'build-essential' 'i386' '1' 'stable'
+insertpackage 'stable' 'debhelper' 'i386' '7'
+insertpackage 'stable' 'build-essential' 'i386' '1'
+insertinstalledpackage 'build-conflict' 'i386' '1'
setupaptarchive
+
+msgmsg 'Test with' 'unsigned dsc'
cat > 2vcard_0.5-3.dsc <<EOF
Format: 1.0
Source: 2vcard
@@ -21,6 +24,7 @@ Maintainer: Martin Albisetti <argentina@gmail.com>
Uploaders: Marcela Tiznado <mlt@debian.org>
Standards-Version: 3.8.0
Build-Depends: debhelper (>= 5.0.37)
+Build-Conflicts: build-conflict (<< 2)
Checksums-Sha1:
b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
@@ -32,17 +36,24 @@ Files:
1e806d32233af87437258d86b1561f57 2036 2vcard_0.5-3.diff.gz
EOF
-testsuccessequal "Reading package lists...
+test2vcardbuilddep() {
+ testsuccessequal "Reading package lists...
Building dependency tree...
Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
+The following packages will be REMOVED:
+ build-conflict
The following NEW packages will be installed:
build-essential debhelper
-0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
+Remv build-conflict [1]
Inst build-essential (1 stable [i386])
Inst debhelper (7 stable [i386])
Conf build-essential (1 stable [i386])
Conf debhelper (7 stable [i386])" aptget build-dep -s 2vcard_0.5-3.dsc
+}
+test2vcardbuilddep
+msgmsg 'Test with' 'signed dsc'
cat > 2vcard_0.5-3.dsc <<EOF
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
@@ -56,6 +67,7 @@ Maintainer: Martin Albisetti <argentina@gmail.com>
Uploaders: Marcela Tiznado <mlt@debian.org>
Standards-Version: 3.8.0
Build-Depends: debhelper (>= 5.0.37)
+Build-Conflicts: build-conflict (<< 2)
Checksums-Sha1:
b7f1ce31ec856414a3f0f1090689f91aa7456d56 9398 2vcard_0.5.orig.tar.gz
5f9acd07ebda6ab00fa6b4fe3198c13e94090862 2036 2vcard_0.5-3.diff.gz
@@ -74,20 +86,10 @@ z2UAn1oXgTai6opwhVfkxrlmJ+iRxzuc
=4eRd
-----END PGP SIGNATURE-----
EOF
-
-testsuccessequal "Reading package lists...
-Building dependency tree...
-Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
-The following NEW packages will be installed:
- build-essential debhelper
-0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
-Inst build-essential (1 stable [i386])
-Inst debhelper (7 stable [i386])
-Conf build-essential (1 stable [i386])
-Conf debhelper (7 stable [i386])" aptget build-dep --simulate 2vcard_0.5-3.dsc
+test2vcardbuilddep
-# unpacked source dir
+msgmsg 'Test with' 'unpacked source dir'
mkdir -p foo-1.0/debian
cat > foo-1.0/debian/control <<'EOF'
Source: apturl
@@ -127,3 +129,14 @@ Inst build-essential (1 stable [i386])
Inst debhelper (7 stable [i386])
Conf build-essential (1 stable [i386])
Conf debhelper (7 stable [i386])" aptget build-dep --simulate ./foo-1.0
+
+
+testfailureequal 'Reading package lists...
+Building dependency tree...
+E: Must specify at least one package to check builddeps for' aptget build-dep
+testfailureequal 'Reading package lists...
+Building dependency tree...
+E: No architecture information available for armel. See apt.conf(5) APT::Architectures for setup' aptget build-dep --simulate ./foo-1.0 -a armel
+testfailureequal 'Reading package lists...
+Building dependency tree...
+E: Unable to find a source package for foo' aptget build-dep --simulate foo
diff --git a/test/integration/test-apt-get-clean b/test/integration/test-apt-get-clean
index 457bff9d3..31e9900c9 100755
--- a/test/integration/test-apt-get-clean
+++ b/test/integration/test-apt-get-clean
@@ -15,6 +15,7 @@ setupaptarchive
# nothing to do always works
testsuccess aptget clean
+testsuccess aptget clean -s
# generate some dirt and clean it up
touch rootdir/var/lib/apt/lists/partial/http.debian.net_debian_dists_sid_main_i18n_Translation-en
diff --git a/test/integration/test-apt-helper b/test/integration/test-apt-helper
index d6c8385af..944406580 100755
--- a/test/integration/test-apt-helper
+++ b/test/integration/test-apt-helper
@@ -89,3 +89,6 @@ testfailureequal 'E: Invalid operation download' apthelper download
testfailureequal 'E: Must specify at least one pair url/filename' apthelper download-file
testfailureequal 'E: Must specify at least one pair url/filename' apthelper download-file http://example.org/
testfailureequal 'E: Need one URL as argument' apthelper auto-detect-proxy
+testfailureequal 'E: Must specify at least one SRV record' apthelper srv-lookup
+testfailureequal 'E: GetSrvRec failed for localhost' apthelper srv-lookup localhost
+testfailureequal 'E: GetSrvRec failed for localhost:8080' apthelper srv-lookup localhost:8080
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index 09ff9304e..662a866aa 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -8,6 +8,7 @@ setupenvironment
configarchitecture 'i386'
LISTS='rootdir/etc/apt/sources.list.d/test.list'
+ABSLISTS="$(readlink -f $LISTS)"
SOURCES='rootdir/etc/apt/sources.list.d/test.sources'
BASE='# some comment
# that contains a : as well
@@ -27,19 +28,39 @@ msgcleantest() {
msgcleantest 'Test sources.list' 'old style'
echo "deb http://ftp.debian.org/debian stable main" > $LISTS
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
msgcleantest 'Test sources.list' 'old style with tabs'
echo "deb http://ftp.debian.org/debian stable main" > $LISTS
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
+msgcleantest 'Test sources.list' 'old style with forgotten end for options'
+echo "deb [trusted=yes arch+=armel,powerpc http://ftp.debian.org/debian stable main" > $LISTS
+testfailureequal "E: Malformed entry 1 in list file $ABSLISTS ([option] not assignment)
+E: The list of sources could not be read." aptget update --print-uris
+
+msgcleantest 'Test sources.list' 'old style with stray ] instead of options'
+echo "deb ] http://ftp.debian.org/debian stable main" > $LISTS
+testfailureequal "E: Malformed entry 1 in list file $ABSLISTS (URI parse)
+E: The list of sources could not be read." aptget update --print-uris
+
+msgcleantest 'Test sources.list' 'old style options no key'
+echo "deb [=test] http://ftp.debian.org/debian stable main" > $LISTS
+testfailureequal "E: Malformed entry 1 in list file $ABSLISTS ([option] no key)
+E: The list of sources could not be read." aptget update --print-uris
+
+msgcleantest 'Test sources.list' 'old style options no value'
+echo "deb [test=] http://ftp.debian.org/debian stable main" > $LISTS
+testfailureequal "E: Malformed entry 1 in list file $ABSLISTS ([option] no value)
+E: The list of sources could not be read." aptget update --print-uris
+
msgcleantest 'Test sources.list' 'old style with options'
echo "deb [trusted=yes arch+=armel,powerpc] http://ftp.debian.org/debian stable main" > $LISTS
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/binary-powerpc/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-powerpc_Packages 0
@@ -47,19 +68,19 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.deb
msgcleantest 'Test sources.list' 'old style with comments'
echo "deb http://ftp.debian.org/debian stable main # non-free" > $LISTS
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
msgcleantest 'Test sources.list' 'old style with option comments'
echo "deb [trusted=yes#yeahreally] http://ftp.debian.org/debian stable main # non-free" > $LISTS
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
msgcleantest 'Test sources.list' 'simple deb822'
echo "$BASE" > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
@@ -68,7 +89,7 @@ msgcleantest 'Test deb822 with' 'two entries'
echo "$BASE" > $SOURCES
echo "" >> $SOURCES
echo "$BASE" | sed s/stable/unstable/ >> $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0
@@ -78,7 +99,7 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.deb
# two suite entries
msgcleantest 'Test deb822 with' 'two Suite entries'
echo "$BASE" | sed -e "s/stable/stable unstable/" > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0
'http://ftp.debian.org/debian/dists/unstable/InRelease' ftp.debian.org_debian_dists_unstable_InRelease 0
@@ -88,14 +109,14 @@ testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.deb
msgcleantest 'Test deb822' 'architecture option'
echo "$BASE" > $SOURCES
echo "Architectures: amd64 armel" >> $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-amd64_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/binary-armel/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-armel_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
msgcleantest 'Test old-style' 'suite arch variable'
echo 'deb http://ftp.tlh.debian.org/universe unstable/binary-$(ARCH)/' > $LISTS
-testequal --nomsg "'http://ftp.tlh.debian.org/universe/unstable/binary-i386/InRelease' ftp.tlh.debian.org_universe_unstable_binary-i386_InRelease 0
+testsuccessequal --nomsg "'http://ftp.tlh.debian.org/universe/unstable/binary-i386/InRelease' ftp.tlh.debian.org_universe_unstable_binary-i386_InRelease 0
'http://ftp.tlh.debian.org/universe/unstable/binary-i386/Packages.xz' ftp.tlh.debian.org_universe_unstable_binary-i386_Packages 0
'http://ftp.tlh.debian.org/universe/unstable/binary-i386/en.xz' ftp.tlh.debian.org_universe_unstable_binary-i386_en 0 " aptget update --print-uris
@@ -103,20 +124,20 @@ msgcleantest 'Test deb822' 'suite arch variable'
echo 'Types: deb
URIs: http://ftp.tlh.debian.org/universe
Suites: stable/binary-$(ARCH)/' > $SOURCES
-testequal --nomsg "'http://ftp.tlh.debian.org/universe/stable/binary-i386/InRelease' ftp.tlh.debian.org_universe_stable_binary-i386_InRelease 0
+testsuccessequal --nomsg "'http://ftp.tlh.debian.org/universe/stable/binary-i386/InRelease' ftp.tlh.debian.org_universe_stable_binary-i386_InRelease 0
'http://ftp.tlh.debian.org/universe/stable/binary-i386/Packages.xz' ftp.tlh.debian.org_universe_stable_binary-i386_Packages 0
'http://ftp.tlh.debian.org/universe/stable/binary-i386/en.xz' ftp.tlh.debian.org_universe_stable_binary-i386_en 0 " aptget update --print-uris
msgcleantest 'Test old-style sources.list file which has' 'malformed dist'
echo "deb http://ftp.debian.org" > $LISTS
-testequal --nomsg "E: Malformed entry 1 in list file $TMPWORKINGDIRECTORY/$LISTS (Suite)
+testfailureequal --nomsg "E: Malformed entry 1 in list file $TMPWORKINGDIRECTORY/$LISTS (Suite)
E: The list of sources could not be read." aptget update --print-uris
msgcleantest 'Test deb822 sources.list file which has' 'malformed URI'
echo "Types: deb
Suites: stable
" > $SOURCES
-testequal --nomsg "E: Malformed entry 1 in sources file $TMPWORKINGDIRECTORY/$SOURCES (URI)
+testfailureequal --nomsg "E: Malformed entry 1 in sources file $TMPWORKINGDIRECTORY/$SOURCES (URI)
E: The list of sources could not be read." aptget update --print-uris
# with Enabled: false
@@ -127,7 +148,7 @@ testempty aptget update --print-uris
# multiple URIs
msgcleantest 'Test deb822 sources.list file which has' 'Multiple URIs work'
echo "$BASE" | sed -e 's#http://ftp.debian.org/debian#http://ftp.debian.org/debian http://ftp.de.debian.org/debian#' > $SOURCES
-testequal --nomsg "'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp.de.debian.org_debian_dists_stable_InRelease 0
'http://ftp.de.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.de.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.de.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.de.debian.org_debian_dists_stable_main_i18n_Translation-en 0
'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
@@ -137,7 +158,7 @@ testequal --nomsg "'http://ftp.de.debian.org/debian/dists/stable/InRelease' ftp
# multiple Type in one field
msgcleantest 'Test deb822 sources.list file which has' 'Multiple Types work'
echo "$BASE" | sed -e 's#Types: deb#Types: deb deb-src#' > $SOURCES
-testequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
+testsuccessequal --nomsg "'http://ftp.debian.org/debian/dists/stable/InRelease' ftp.debian.org_debian_dists_stable_InRelease 0
'http://ftp.debian.org/debian/dists/stable/main/source/Sources.xz' ftp.debian.org_debian_dists_stable_main_source_Sources 0
'http://ftp.debian.org/debian/dists/stable/main/binary-i386/Packages.xz' ftp.debian.org_debian_dists_stable_main_binary-i386_Packages 0
'http://ftp.debian.org/debian/dists/stable/main/i18n/Translation-en.xz' ftp.debian.org_debian_dists_stable_main_i18n_Translation-en 0 " aptget update --print-uris
@@ -149,6 +170,6 @@ Types: deb
URIs: http://emacs.naquadah.org
Suites: stable/
EOF
-testequal --nomsg "'http://emacs.naquadah.org/stable/InRelease' emacs.naquadah.org_stable_InRelease 0
+testsuccessequal --nomsg "'http://emacs.naquadah.org/stable/InRelease' emacs.naquadah.org_stable_InRelease 0
'http://emacs.naquadah.org/stable/Packages.xz' emacs.naquadah.org_stable_Packages 0
'http://emacs.naquadah.org/stable/en.xz' emacs.naquadah.org_stable_en 0 " aptget update --print-uris
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol
index 3654e705c..a9746d4a2 100755
--- a/test/integration/test-external-dependency-solver-protocol
+++ b/test/integration/test-external-dependency-solver-protocol
@@ -27,6 +27,9 @@ setupaptarchive
testfailure aptget install --solver dump coolstuff -s
testsuccess grep ERR_NO_FILENAME rootdir/tmp/testfailure.output
+export APT_EDSP_DUMP_FILENAME="/nonexistent/apt/edsp.dump"
+testfailure aptget install --solver dump coolstuff -s
+testsuccess grep ERR_WRITE_ERROR rootdir/tmp/testfailure.output
export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/downloaded/dump.edsp"
testfailureequal 'Reading package lists...
@@ -111,6 +114,14 @@ testfailure aptget install awesome badstuff -s --solver apt
testsuccess grep 'ERR_UNSOLVABLE' rootdir/tmp/testfailure.output
configarchitecture 'armel'
+testfailure aptget install --solver apt awesomecoolstuff:i386 -s
+msgtest 'An invalid EDSP file generates a' 'hard error'
+if echo "Request: This is a test\nFoo: bar\n\n" | aptinternalsolver -q=0 > solver.result 2>&1; then
+ cat solver.result
+ msgfail
+else
+ msgpass
+fi
msgtest 'Test direct calling is okay for' 'apt-internal-solver'
cat "$APT_EDSP_DUMP_FILENAME" | aptinternalsolver -q=0 > solver.result 2>&1 || true
if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then
@@ -121,8 +132,6 @@ else
fi
rm -f "$APT_EDSP_DUMP_FILENAME"
-testfailure aptget install --solver apt awesomecoolstuff:i386 -s
-
testsuccess aptinternalsolver scenario
testsuccessequal 'Package: stuff
Source: stuff
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index 4dc94db76..f6a94ba67 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -95,14 +95,6 @@ SHA256-Download:
testsuccessequal "$(cat ${PKGFILE}-new)
" aptcache show apt newstuff
- msgmsg "Testcase: index is already up-to-date: $*"
- find rootdir/var/lib/apt/lists -name '*diff_Index' -type f -delete
- testsuccess aptget update "$@"
- testequal 'Hit:1 http://localhost:8080 InRelease
-Reading package lists...' aptget update "$@" -o Debug::Acquire::Transaction=0 -o Debug::pkgAcquire::Diffs=0
- testsuccessequal "$(cat ${PKGFILE}-new)
-" aptcache show apt newstuff
-
msgmsg "Testcase: apply with two patches: $*"
cp ${PKGFILE}-new aptarchive/Packages
echo '