test-changelog 900 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture "i386"
  7. buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
  8. setupaptarchive
  9. changetowebserver
  10. aptget update -qq
  11. echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf
  12. testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris
  13. aptget changelog apt -qq > apt.changelog
  14. testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
  15. rm aptarchive/pool/apt_1.0/changelog
  16. aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog
  17. testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
  18. rm aptarchive/pool/apt_1.0.changelog
  19. testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'