test-apt-get-changelog 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 apt.changelog
  16. aptget changelog apt -d -qq
  17. testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
  18. rm apt.changelog aptarchive/pool/apt_1.0/changelog
  19. aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog
  20. testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
  21. rm apt.changelog
  22. aptget changelog apt -d -qq
  23. testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
  24. rm apt.changelog aptarchive/pool/apt_1.0.changelog
  25. testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'