]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-releasefile-verification
CMake: Switch integration tests and travis over
[apt.git] / test / integration / test-releasefile-verification
index a95c20fd45be3fc1f71ef9e7bb212bba6c593155..82e48ffa8d69304a978a9ac2b60e7cfc43449537 100755 (executable)
@@ -7,6 +7,7 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
 setupenvironment
 configarchitecture "i386"
 
+export APT_DONT_SIGN='Release.gpg'
 buildaptarchive
 setupflataptarchive
 changetowebserver
@@ -368,7 +369,7 @@ runtest3() {
                export APT_DONT_SIGN="$DELETEFILE"
                msgmsg "Running test with deletion of $DELETEFILE and $1 digest"
                runtest
-               unset APT_DONT_SIGN
+               export APT_DONT_SIGN='Release.gpg'
        done
 }
 
@@ -378,7 +379,7 @@ cat > rootdir/etc/apt/apt.conf.d/weaken-security <<EOF
 Acquire::AllowInsecureRepositories "1";
 Acquire::AllowDowngradeToInsecureRepositories "1";
 EOF
-# the hash marked as configureable in our gpgv method
+# the hash marked as configurable in our gpgv method
 export APT_TESTS_DIGEST_ALGO='SHA224'
 
 successfulaptgetupdate() {
@@ -413,6 +414,11 @@ runfailure() {
                testnopackage 'apt'
                testwarning aptget update --allow-insecure-repositories -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::gpgv=1
                failaptold
+               rm -rf rootdir/var/lib/apt/lists
+               sed -i 's#^deb\(-src\)\? #deb\1 [allow-insecure=yes] #' rootdir/etc/apt/sources.list.d/*
+               testwarning aptget update --no-allow-insecure-repositories -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::gpgv=1
+               failaptold
+               sed -i 's#^deb\(-src\)\? \[allow-insecure=yes\] #deb\1 #' rootdir/etc/apt/sources.list.d/*
 
                msgmsg 'Cold archive signed by' 'Marvin Paranoid'
                prepare "${PKGFILE}"
@@ -424,7 +430,7 @@ runfailure() {
                testsuccessequal "$(cat "${PKGFILE}")
 " aptcache show apt
                failaptold
-               unset APT_DONT_SIGN
+               export APT_DONT_SIGN='Release.gpg'
        done
 }
 runfailure