test-apt-update-empty-files 632 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. configcompression '.' 'gz'
  8. insertpackage 'unstable' 'apt' 'amd64' '1'
  9. # this automatically gives us an empty Sources file
  10. setupaptarchive --no-update
  11. msgmsg 'Test with file'
  12. rm -rf rootdir/var/lib/apt/lists
  13. testsuccess apt update -o Debug::pkgAcquire::Worker=1
  14. cp rootdir/tmp/testsuccess.output apt.output
  15. testsuccess grep '%0aAlt-Filename:%20/.*/Sources%0a' apt.output
  16. msgmsg 'Test with http'
  17. changetowebserver
  18. rm -rf rootdir/var/lib/apt/lists
  19. testsuccess apt update -o Debug::pkgAcquire::Worker=1