summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-11-15 14:19:00 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-11-15 14:19:00 +0100
commite58371283fff2f9bb6a7edb3868d7eb08d175175 (patch)
treee94867ee0c7d1d2ad400086b6605e68225fb8665 /test
parent64b4c03ee79d5df053df7dabd33e88e0ebef1f20 (diff)
test/integration/test-changelog: add regression test for changelog downloader
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-changelog34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/integration/test-changelog b/test/integration/test-changelog
new file mode 100755
index 000000000..292df6e32
--- /dev/null
+++ b/test/integration/test-changelog
@@ -0,0 +1,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
+