summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-10-05 10:49:34 +0200
committerMichael Vogt <mvo@debian.org>2013-10-05 10:49:34 +0200
commit0fa3c89c9e5c2c61a70c714ef8e4ac9d2b7d6ae1 (patch)
tree54a79b695d236233a3f1db0f097b646adb858208 /test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
parentb821e492d6dc4e1e8fd1f83590e12e3fbccad717 (diff)
parentbe297c7ab3c16edcbdd6afc699c73a58e545b599 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Diffstat (limited to 'test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted')
-rwxr-xr-xtest/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted29
1 files changed, 20 insertions, 9 deletions
diff --git a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
index 1c2514938..633c197c0 100755
--- a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
+++ b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
@@ -26,17 +26,26 @@ testrun() {
rm -rf rootdir/var/lib/apt
testsuccess aptget update
- testsuccess aptget download cool
- testfileexists 'cool_1.0_i386.deb'
+ if [ "$1" = 'trusted' ]; then
+ testsuccess aptget download cool
+ testfileexists 'cool_1.0_i386.deb'
+
+ testsuccess aptget download cool --allow-unauthenticated
+ testfileexists 'cool_1.0_i386.deb'
+ else
+ testfailure aptget download cool
+ testfilemissing 'cool_1.0_i386.deb'
+
+ testsuccess aptget download cool --allow-unauthenticated
+ testfileexists 'cool_1.0_i386.deb'
+ fi
mv aptarchive/pool/cool_1.0_i386.deb aptarchive/pool/cool_1.0_i386.deb.bak
echo 'this is not a good package' > aptarchive/pool/cool_1.0_i386.deb
- # FIXME: apt-get download should exit non-zero if download fails
- aptget download cool
+ testfailure aptget download cool
testfilemissing cool_1.0_i386.deb
- # FIXME: apt-get download should exit non-zero if download fails
- aptget download cool --allow-unauthenticated # unauthenticated doesn't mean unchecked
+ testfailure aptget download cool --allow-unauthenticated # unauthenticated doesn't mean unchecked
testfilemissing cool_1.0_i386.deb
rm -f aptarchive/pool/cool_1.0_i386.deb
@@ -45,8 +54,10 @@ testrun() {
testfileexists 'cool_1.0_i386.deb'
}
-testrun
+testrun 'trusted'
find aptarchive/ \( -name 'Release.gpg' -o -name 'InRelease' \) -delete
-# FIXME: apt-get download should warn about untrusted downloads
-testrun
+testrun 'untrusted'
+
+changetowebserver
+testrun 'untrusted'