Add test coverage for debexpo_importer.py

This MR adds test coverage of the importation process.

For each test case:

  • corrupted-changes: Invalid change file
  • debian-orig-too-big: Debian orig.tar.gz is too big to be downloaded
  • emtpy-changes: Changes file is emtpy
  • hello: Correct package importation
  • invalid-dist: Use of unsupported dist
  • missing-file-in-changes: Missing files from the upload
  • no-dsc: No dsc in the upload
  • no-orig: No orig.tar.gz in the upload and existing
  • not-signed: Upload not signed
  • unknown-key: GPG key not in debexpo keyring
  • wrong-checksum-in-changes: File corrupted in the upload
  • wrong-gpg-uid: Attempt to forge signed package (with GPG key matching a user registered email)

It will assert:

  • Importer status (success/failure)
  • Email report (matching content/no mail)
  • Database modification (Package has been added or not)
  • Repo modification (Package has been added or not)

This MR relates #6 (closed)

Merge request reports

Loading