test-bug-838779-untrusted-to-trusted-Release-hit 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. buildsimplenativepackage 'foo' 'all' '1' 'stable'
  8. export APT_DONT_SIGN=''
  9. setupaptarchive --no-update
  10. changetowebserver
  11. testsuccess aptget update
  12. testdpkgnotinstalled 'foo'
  13. testsuccess apt install foo -y
  14. testdpkginstalled 'foo'
  15. testsuccess apt purge foo -y
  16. testdpkgnotinstalled 'foo'
  17. msgmsg 'Untrusted to trusted hit' 'InRelease'
  18. rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
  19. mv rootdir/etc/apt/trusted.gpg.d rootdir/etc/apt/trusted.gpg.d-bak
  20. testwarning aptget update
  21. testfailure apt install foo -y
  22. testdpkgnotinstalled 'foo'
  23. mv rootdir/etc/apt/trusted.gpg.d-bak rootdir/etc/apt/trusted.gpg.d
  24. testsuccess aptget update
  25. testsuccess apt install foo -y
  26. testdpkginstalled 'foo'
  27. testsuccess apt purge foo -y
  28. testdpkgnotinstalled 'foo'
  29. msgmsg 'Untrusted to trusted hit' 'Release.gpg'
  30. find aptarchive -name 'InRelease' -delete
  31. rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
  32. mv rootdir/etc/apt/trusted.gpg.d rootdir/etc/apt/trusted.gpg.d-bak
  33. testwarning aptget update
  34. testfailure apt install foo -y
  35. testdpkgnotinstalled 'foo'
  36. mv rootdir/etc/apt/trusted.gpg.d-bak rootdir/etc/apt/trusted.gpg.d
  37. testsuccess aptget update
  38. testsuccess apt install foo -y
  39. testdpkginstalled 'foo'