test-bug-719263-print-uris-removes-authentication 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. insertinstalledpackage 'unrelated' 'all' '1'
  8. buildsimplenativepackage 'unrelated' 'all' '2' 'unstable'
  9. setupaptarchive
  10. testnoact() {
  11. cp -a rootdir/var/lib/dpkg/status rootdir/var/lib/dpkg/status-backup-noact
  12. touch rootdir/var/lib/apt/extended_states
  13. testsuccessequal 'Reading package lists...
  14. Building dependency tree...
  15. Reading state information...
  16. The following packages will be upgraded:
  17. unrelated
  18. 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  19. Inst unrelated [1] (2 unstable [all])
  20. Conf unrelated (2 unstable [all])' aptget install unrelated -s
  21. testsuccess aptget install unrelated -y
  22. testdpkginstalled unrelated
  23. rm -rf rootdir/var/cache/apt/*.bin
  24. cp -a rootdir/var/lib/dpkg/status-backup-noact rootdir/var/lib/dpkg/status
  25. }
  26. testnoact
  27. testsuccess aptget update --print-uris
  28. testnoact
  29. # same thing, just not with InRelease this time
  30. rm -rf rootdir/var/lib/apt/lists
  31. testsuccess aptget update -o Acquire::TryInRelease=0
  32. testnoact
  33. testsuccess aptget update --print-uris -o Acquire::TryInRelease=0
  34. testnoact