test-apt-update-simple 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. insertpackage 'unstable' 'foo' 'all' '1'
  8. insertpackage 'unstable' 'bar' 'amd64' '1'
  9. insertpackage 'unstable' 'bar' 'i386' '1'
  10. insertsource 'unstable' 'foo' 'all' '1'
  11. sed -e 's#^Description-en:#Description-de:#' \
  12. aptarchive/dists/unstable/main/i18n/Translation-en > aptarchive/dists/unstable/main/i18n/Translation-de
  13. setupaptarchive --no-update
  14. changetowebserver
  15. # the framework modifies some configs to ensure testability,
  16. # at the expense of creating an environment which doesn't always
  17. # reflect apts "normal" behavior on a "normal" system
  18. echo 'Acquire::IndexTargets::Randomized "true";
  19. Acquire::Languages { "environment"; "en"; "de"; };
  20. ' > rootdir/etc/apt/apt.conf.d/restore-simplicity
  21. testempty aptget indextargets
  22. testsuccess aptget update
  23. testequal 'main/source/Sources
  24. main/binary-amd64/Packages
  25. main/binary-all/Packages
  26. main/i18n/Translation-en
  27. main/i18n/Translation-de' aptget indextargets --format '$(METAKEY)'