diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-07 14:38:01 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-07 14:38:01 +0100 |
commit | 1384504286b7923a85d6235ba6f8e2eb4766d967 (patch) | |
tree | b9d2a7e6d74754775b337d3b50c41e1c51ce7111 /test/integration/test-changelog | |
parent | bea417121247afe00cdd4ba13215544d5b5d3262 (diff) |
test changelogs locally instead of depending on an online service
Diffstat (limited to 'test/integration/test-changelog')
-rwxr-xr-x | test/integration/test-changelog | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/test/integration/test-changelog b/test/integration/test-changelog index 292df6e32..f05279356 100755 --- a/test/integration/test-changelog +++ b/test/integration/test-changelog @@ -7,28 +7,20 @@ TESTDIR=$(readlink -f $(dirname $0)) 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 +buildsimplenativepackage 'apt' 'all' '1.0' 'stable' setupaptarchive +changetowebserver +aptget update -qq -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 +echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf +aptget changelog apt -qq > apt.changelog +testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)" +rm 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 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/' |