From e58371283fff2f9bb6a7edb3868d7eb08d175175 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 15 Nov 2010 14:19:00 +0100 Subject: test/integration/test-changelog: add regression test for changelog downloader --- test/integration/test-changelog | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 test/integration/test-changelog (limited to 'test') 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 + -- cgit v1.2.3-70-g09d2 From ded9d4e22002ead2aa12bc5bc8b34c21f2d3b707 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 15 Nov 2010 14:19:23 +0100 Subject: test/integration/framework: set methods dir --- test/integration/framework | 1 + 1 file changed, 1 insertion(+) (limited to 'test') 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 -- cgit v1.2.3-70-g09d2