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.
 
 
 
 
 
 

40 lines
1.1 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'i386'
  7. configcompression 'gz'
  8. insertpackage 'testing' 'foo' 'all' '1'
  9. insertpackage 'testing' 'foo2' 'all' '1'
  10. insertsource 'testing' 'foo' 'all' '1'
  11. insertsource 'testing' 'foo2' 'all' '1'
  12. setupaptarchive --no-update
  13. changetowebserver
  14. find aptarchive \( -name 'Packages' -o -name 'Sources' -o -name 'Translation-en' \) -delete
  15. testsuccess aptget update
  16. testsuccess aptcache show foo
  17. testsuccess aptget install foo -s
  18. for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver.log.client*.log); do
  19. msgmsg 'Test hashsum mismatch with file' "$get"
  20. breakfiles "aptarchive/${get}"
  21. rm -rf rootdir/var/lib/apt/lists
  22. testfailure aptget update
  23. cp rootdir/tmp/testfailure.output rootdir/tmp/update.output
  24. testsuccess grep -E "$(basename "$get" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output
  25. testfailure aptcache show foo
  26. testfailure aptget install foo -s
  27. testfailure aptcache show bar
  28. testfailure aptget install bar -s
  29. unbreakfiles "aptarchive/${get}"
  30. done