]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
activate AI_IDN by default to support IDN domains
[apt.git] / test / integration / test-bug-617690-allow-unauthenticated-makes-all-untrusted
index 0736bb6dc598de4f07084f011edc0c83efc9ab93..582e1bf5eec0e7e1b1413e3c2c0c8f43f615dbea 100755 (executable)
@@ -24,6 +24,7 @@ testfilemissing() {
 
 testrun() {
        rm -rf rootdir/var/lib/apt
+       cd downloaded
 
        if [ "$1" = 'trusted' ]; then
                testsuccess aptget update
@@ -34,7 +35,7 @@ testrun() {
                testsuccess aptget download cool --allow-unauthenticated
                testfileexists 'cool_1.0_i386.deb'
        else
-                testsuccess aptget update --allow-insecure-repositories
+                testwarning aptget update --allow-insecure-repositories
 
                testfailure aptget download cool
                testfilemissing 'cool_1.0_i386.deb'
@@ -43,18 +44,19 @@ testrun() {
                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
+       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
        testfailure aptget download cool
        testfilemissing cool_1.0_i386.deb
 
        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
-       mv aptarchive/pool/cool_1.0_i386.deb.bak aptarchive/pool/cool_1.0_i386.deb
+       rm -f ../aptarchive/pool/cool_1.0_i386.deb
+       mv ../aptarchive/pool/cool_1.0_i386.deb.bak ../aptarchive/pool/cool_1.0_i386.deb
        testsuccess aptget download cool --allow-unauthenticated
        testfileexists 'cool_1.0_i386.deb'
+       cd - >/dev/null
 }
 
 testrun 'trusted'