test-apt-update-ims 756 B

1234567891011121314151617181920212223242526
  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
  9. changetowebserver
  10. testsuccess aptget update
  11. # check that I-M-S header is kept in redirections
  12. testequal "Hit http://localhost:8080 unstable InRelease
  13. Hit http://localhost:8080 unstable/main Sources
  14. Hit http://localhost:8080 unstable/main amd64 Packages
  15. Hit http://localhost:8080 unstable/main Translation-en
  16. Reading package lists..." aptget update
  17. # ensure that we still do a hash check on ims hit
  18. msgtest 'Test I-M-S reverify'
  19. aptget update -o Debug::pkgAcquire::Auth=1 2>&1 | grep -A1 'RecivedHash:' | grep -q -- '- SHA' && msgpass || msgfail