You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
1.0 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
  8. setupaptarchive --no-update
  9. changetowebserver -o aptwebserver::redirect::replace::/pool/=/newpool/ \
  10. -o aptwebserver::redirect::replace::/dists/=/newdists/
  11. mv aptarchive/pool aptarchive/newpool
  12. mv aptarchive/dists aptarchive/newdists
  13. testrun() {
  14. msgmsg 'Test redirection works in method boundaries' "$1"
  15. msgtest 'Test redirection works in' 'apt-get update'
  16. testsuccess --nomsg aptget update
  17. # check that I-M-S header is kept in redirections
  18. testsuccessequal "Hit:1 $1 unstable InRelease
  19. Reading package lists..." aptget update
  20. msgtest 'Test redirection works in' 'package download'
  21. testsuccess --nomsg aptget install unrelated --download-only -y
  22. }
  23. testrun "http://localhost:${APTHTTPPORT}"
  24. rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
  25. changetohttpswebserver
  26. testrun "https://localhost:${APTHTTPSPORT}"