]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
10 | buildsimplenativepackage 'apt' 'all' '1.0' 'stable' | |
11 | ||
12 | setupaptarchive | |
13 | changetowebserver | |
14 | aptget update -qq | |
15 | ||
16 | echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf | |
17 | ||
18 | testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris | |
19 | ||
20 | aptget changelog apt -qq > apt.changelog | |
21 | testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" | |
22 | rm apt.changelog | |
23 | ||
24 | aptget changelog apt -d -qq | |
25 | testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" | |
26 | rm apt.changelog aptarchive/pool/apt_1.0/changelog | |
27 | ||
28 | aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog | |
29 | testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" | |
30 | rm apt.changelog | |
31 | ||
32 | aptget changelog apt -d -qq | |
33 | testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)" | |
34 | rm apt.changelog aptarchive/pool/apt_1.0.changelog | |
35 | ||
36 | testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' |