summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-11-18 10:32:41 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-11-18 10:32:41 +0100
commit2d555a8205eccc4cb17b93f7c92b71a854e8f82e (patch)
tree560bb435bfb46f73abe61174edfffbfce1b2de85 /test
parent0e3e112e3d60647e335aee7e6ce308b29fd11988 (diff)
parentd786352da27c6f05bc372a061f3a78237b69e6f4 (diff)
merged lp:~mvo/apt/apt-get-changelog
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework1
-rwxr-xr-xtest/integration/test-changelog34
2 files changed, 35 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 2422f0886..f78ae2ee1 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -117,6 +117,7 @@ setupenvironment() {
echo "Debug::NoLocking \"true\";" >> aptconfig.conf
echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf
echo "Dir::Bin::dpkg \"fakeroot\";" >> aptconfig.conf
+ echo "Dir::Bin::methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf
echo "DPKG::options:: \"dpkg\";" >> aptconfig.conf
echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf
echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf
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
+