summaryrefslogtreecommitdiff
path: root/test/integration/test-changelog
blob: 292df6e328ecaad3c42553ba7be5a315d1977fba (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
27
28
29
30
31
32
33
34
#!/bin/sh
set -e

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

setupenvironment
configarchitecture "i386"

# this will be valid until ubuntu lucid is EOL (04/2015)
pkgchangelogtest="Package: apt
Architecture: i386
Version: 0.7.25.3ubuntu7
Filename: pool/main/a/apt/apt_0.7.25.3ubuntu7_i386.deb
Section: admin
"
cat <<-EOF >aptarchive/Packages
$pkgchangelogtest
EOF

setupaptarchive

echo "Apt::Changelogs::Server \"http://changelogs.ubuntu.com/\";" >> ./aptconfig.conf
msgnmsg "apt-get changelog: "
aptget changelog apt -qq > downloaded-changelog
expected="apt (0.7.25.3ubuntu7) lucid; urgency=low"
got="$(head -n1 downloaded-changelog)"
if [ -s downloaded-changelog ] && [ "$got" = "$expected" ]; then
    msgpass
else
    msgfail 
    msgwarn "$got != $expected"
fi