summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-changelog
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2011-02-08 10:35:39 +0100
committerMichael Vogt <mvo@debian.org>2011-02-08 10:35:39 +0100
commit33e46bc7032c2bcab654ab3f6a0a10ad82264ead (patch)
treeb0117e8152475b94551bfe993460be64fcf3343b /test/integration/test-apt-get-changelog
parent09b8bd3226a68272f98e4020d10348ff26642500 (diff)
parent7376837d338fd9399cfa4820b6f9bacbb2634d46 (diff)
merged lp:~donkult/apt/sid
Diffstat (limited to 'test/integration/test-apt-get-changelog')
-rwxr-xr-xtest/integration/test-apt-get-changelog36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
new file mode 100755
index 000000000..0a80cc08c
--- /dev/null
+++ b/test/integration/test-apt-get-changelog
@@ -0,0 +1,36 @@
+#!/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
+
+testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+
+aptget changelog apt -qq > apt.changelog
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
+rm apt.changelog
+
+aptget changelog apt -d -qq
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
+rm apt.changelog 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 apt.changelog
+
+aptget changelog apt -d -qq
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
+rm apt.changelog 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/'