]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-acquire-same-repository-multiple-times
do delay the test for http, too, to make it more reliable
[apt.git] / test / integration / test-acquire-same-repository-multiple-times
index a46e0d73ca83f4342db5f65639a654d07623cd0e..abdfef8f01e9dd10db9da155eb19162e7593097a 100755 (executable)
@@ -26,31 +26,32 @@ mkdir $NEWMETHODS
 for METH in $(find $OLDMETHODS ! -type d); do
        ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
 done
-rm $NEWMETHODS/file
-cat >$NEWMETHODS/file <<EOF
+rm "${NEWMETHODS}/file" "${NEWMETHODS}/http"
+cat >"${NEWMETHODS}/file" <<EOF
 #!/bin/sh
 while read line; do
        echo "\$line"
        if [ -z "\$line" ]; then
                sleep 0.5
        fi
-done | $OLDMETHODS/file
+done | "$OLDMETHODS/\${0##*/}"
 EOF
-chmod +x $NEWMETHODS/file
+chmod +x "${NEWMETHODS}/file"
+ln -s "${NEWMETHODS}/file" "${NEWMETHODS}/http"
 
 tworepos() {
        msgtest "Downloading the same repository twice over $1" "$3"
        testsuccess --nomsg aptget update -o Debug::pkgAcquire::Worker=1
        cp rootdir/tmp/testsuccess.output download.log
        #cat download.log
-       aptget files --format '$(FILENAME)' --no-release-info | sort > file.lst
+       aptget indextargets --format '$(FILENAME)' --no-release-info | sort > file.lst
        testequal "$(find $(readlink -f ./rootdir/var/lib/apt/lists) -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
        testsuccess aptcache policy
        testequal "foo:
   Installed: (none)
   Candidate: 1.0
   Version table:
-     1.0 0
+     1.0 500
         500 $1:$2 jessie/main amd64 Packages
         500 $1:$2 stable/main amd64 Packages" aptcache policy foo
        testfailure aptcache show foo/unstable