test-apt-redirect-loop 788 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture "i386"
  7. echo 'alright' > aptarchive/working
  8. changetohttpswebserver
  9. webserverconfig 'aptwebserver::redirect::replace::/redirectme3/' '/redirectme/'
  10. webserverconfig 'aptwebserver::redirect::replace::/redirectme2/' '/redirectme3/'
  11. webserverconfig 'aptwebserver::redirect::replace::/redirectme/' '/redirectme2/'
  12. testfailure apthelper download-file "http://localhost:${APTHTTPPORT}/redirectme/working" httpfile
  13. testsuccess grep 'Redirection loop encountered' rootdir/tmp/testfailure.output
  14. testfailure apthelper download-file "https://localhost:${APTHTTPSPORT}/redirectme/working" httpsfile
  15. testsuccess grep 'Redirection loop encountered' rootdir/tmp/testfailure.output