]>
Commit | Line | Data |
---|---|---|
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 | ||
7 | set -e | |
8 | ||
9 | TESTDIR=$(readlink -f $(dirname $0)) | |
10 | . $TESTDIR/framework | |
11 | setupenvironment | |
12 | configarchitecture 'amd64' | |
13 | ||
14 | changetowebserver | |
15 | webserverconfig 'aptwebserver::support::range' 'true' | |
16 | ||
17 | TESTFILE='aptarchive/testfile' | |
18 | dd if=/dev/zero of=$TESTFILE bs=100k count=1 2>/dev/null | |
19 | ||
20 | DOWNLOADLOG='rootdir/tmp/testdownloadfile.log' | |
21 | ||
4fc6b757 | 22 | TARGET=./downloaded/testfile-downloaded |
f4a91278 | 23 | dd if=/dev/zero of=$TARGET bs=99k count=1 2>/dev/null |
6c0765c0 | 24 | if ! downloadfile http://localhost:${APTHTTPPORT}/testfile "$TARGET" > "$DOWNLOADLOG"; then |
f4a91278 MV |
25 | cat >&2 "$DOWNLOADLOG" |
26 | msgfail | |
27 | else | |
28 | msgpass | |
29 | fi |