summaryrefslogtreecommitdiff
path: root/test/integration/test-changelog
blob: f0527935645ea15a977774b1692e8f5cb02d2493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
set -e

TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework

setupenvironment
configarchitecture "i386"

buildsimplenativepackage 'apt' 'all' '1.0' 'stable'

setupaptarchive
changetowebserver
aptget update -qq

echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf

aptget changelog apt -qq > apt.changelog
testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
rm aptarchive/pool/apt_1.0/changelog

aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog
testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
rm aptarchive/pool/apt_1.0.changelog

testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'