]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-lp1445239-download-loop
show apt-key warnings in apt update
[apt.git] / test / integration / test-bug-lp1445239-download-loop
CommitLineData
f4a91278
MV
1#!/bin/sh
2#
3# this is a regression test for LP: #1445239 where a partial download can
4# trigger an endless hang of the download method
5#
6
7set -e
8
3abb6a6a
DK
9TESTDIR="$(readlink -f "$(dirname "$0")")"
10. "$TESTDIR/framework"
f4a91278
MV
11setupenvironment
12configarchitecture 'amd64'
13
14changetowebserver
f4a91278
MV
15
16TESTFILE='aptarchive/testfile'
17dd if=/dev/zero of=$TESTFILE bs=100k count=1 2>/dev/null
18
19DOWNLOADLOG='rootdir/tmp/testdownloadfile.log'
20
4fc6b757 21TARGET=./downloaded/testfile-downloaded
f4a91278 22dd if=/dev/zero of=$TARGET bs=99k count=1 2>/dev/null
6c0765c0 23if ! downloadfile http://localhost:${APTHTTPPORT}/testfile "$TARGET" > "$DOWNLOADLOG"; then
f4a91278
MV
24 cat >&2 "$DOWNLOADLOG"
25 msgfail
26else
27 msgpass
28fi