]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-apt-get-changelog
Use _apt as our unprivileged user name
[apt.git] / test / integration / test-apt-get-changelog
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386"
9
10buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
11
12setupaptarchive --no-update
13changetowebserver
14testsuccess aptget update
15
16echo 'Apt::Changelogs::Server "http://localhost:8080/";' > rootdir/etc/apt/apt.conf.d/changelog.conf
17
18testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris
19
20testequal "'http://localhost:8080//pool/apt_1.0/changelog'
21'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris
22
23aptget changelog apt -qq > apt.changelog
24testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
25rm apt.changelog
26
27testsuccess aptget changelog apt -d
28testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
29rm apt.changelog aptarchive/pool/apt_1.0/changelog
30
31testequal "$(cat aptarchive/pool/apt_1.0.changelog)" aptget changelog apt \
32 -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
33
34testsuccess aptget changelog apt -d
35testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
36rm apt.changelog aptarchive/pool/apt_1.0.changelog
37
38testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'