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