From 06f051596d2001e3437666e65c4a0816bcbaa950 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Sun, 2 Dec 2018 18:34:41 +0100 Subject: [PATCH 01/17] Skeleton for importer tests --- debexpo/tests/__init__.py | 45 ++++++++- debexpo/tests/importer/__init__.py | 87 ++++++++++++++++ debexpo/tests/importer/test_importer.py | 129 ++++++++++++++++++++++++ 3 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 debexpo/tests/importer/__init__.py create mode 100644 debexpo/tests/importer/test_importer.py diff --git a/debexpo/tests/__init__.py b/debexpo/tests/__init__.py index 2d7e26ed..9ac441b2 100644 --- a/debexpo/tests/__init__.py +++ b/debexpo/tests/__init__.py @@ -47,6 +47,7 @@ __license__ = 'MIT' import os import sys import md5 +import tempfile from datetime import datetime from unittest import TestCase @@ -64,6 +65,7 @@ from debexpo.model.package_versions import PackageVersion from debexpo.model.source_packages import SourcePackage from debexpo.model.user_upload_key import UserUploadKey from debexpo.model.user_countries import UserCountry +from debexpo.lib.gnupg import GnuPG __all__ = ['environ', 'url', 'TestController'] @@ -80,6 +82,26 @@ class TestController(TestCase): 'password': 'password', 'commit': 'submit'} + _GPG_KEY = """-----BEGIN PGP PUBLIC KEY BLOCK----- + +mDMEW/GBqhYJKwYBBAHaRw8BAQdA+6hBA4PcdcPwgMsKGQXrqwbJemLBgS1PkKZg +RFlKdKi0IHByaW1hcnkgaWQgPHByaW1hcnlAZXhhbXBsZS5vcmc+iJMEExYIADsC +GwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQRVkwbu4cjBst0cc7HENHgc6HHz +3wUCW/GB7AIZAQAKCRDENHgc6HHz35EOAP9lXBb8lm72xPeMdjRL+TU83PimD0NZ +urQfnnLVZOu4tAEAqdrz/2q41mScnKJFAnQ5pan5FYlUnDR2WVp1kiFoPwu0HVRl +c3QgdXNlciA8ZW1haWxAZXhhbXBsZS5jb20+iJAEExYIADgWIQRVkwbu4cjBst0c +c7HENHgc6HHz3wUCW/GB6AIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRDE +NHgc6HHz3yr6AP9MyMaz+dsOC3R/WnjE8EdM42mpf3VkKY0icS60K/Aj3QD/XkIA +qs+ItQAUoeqZM3jh0HvLwUESxm6FtCltwyGlqwW4OARb8YGqEgorBgEEAZdVAQUB +AQdANrk3qq/eP1TEWfFZqhR0vcz7YB9c5+OnvMV+xO4W3nQDAQgHiHgEGBYIACAW +IQRVkwbu4cjBst0cc7HENHgc6HHz3wUCW/GBqgIbDAAKCRDENHgc6HHz3/CHAP0c +hxes4Ebtg7N8B/BoMYwmUVvmMVmoV+ef/vqYvfm6sgEA6fKzMSXllw57UJ90Unyn +xOwJ1heEnfmgPkuiz7jFCAo= +=xgUN +-----END PGP PUBLIC KEY BLOCK-----""" + + _GPG_ID= '256E/E871F3DF' + def __init__(self, *args, **kwargs): wsgiapp = pylons.test.pylonsapp config = wsgiapp.config @@ -109,7 +131,26 @@ class TestController(TestCase): meta.session.query(UserCountry).delete() meta.session.commit() - def _setup_example_user(self): + def _add_gpg_key(self, user): + gpg_ctl = GnuPG() + + # Update gpg info in user object + user.gpg = self._GPG_KEY + user.gpg_id = self._GPG_ID + + # Add key to keyring + temp = tempfile.NamedTemporaryFile(delete=True) + temp.write(user.gpg) + temp.flush() + gpg_ctl.add_signature(temp.name) + temp.close() + + # Update user in database + meta.session.merge(user) + meta.session.commit() + + + def _setup_example_user(self, gpg=False): """Add an example user. The example user with name ``Test user``, email address @@ -134,6 +175,8 @@ class TestController(TestCase): meta.session.add(user_upload_key) meta.session.commit() + if gpg: + self._add_gpg_key(user) def _remove_example_user(self): """Remove the example user. diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py new file mode 100644 index 00000000..2cd011fc --- /dev/null +++ b/debexpo/tests/importer/__init__.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +# +# test_upload.py — UploadController test cases +# +# This file is part of debexpo +# https://salsa.debian.org/mentors.debian.net-team/debexpo +# +# Copyright © 2018 Baptiste BEAUPLAT +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +__author__ = 'Baptiste BEAUPLAT' +__copyright__ = 'Copyright © 2018 Baptiste BEAUPLAT' +__license__ = 'MIT' + +from debexpo.tests import TestController, url + +class TestImporterController(TestController): + """ + Toolbox for importer tests + + This class setup an environment for package to be imported in and ensure + cleanup afterward. + """ + + def __init__(self, *args, **kwargs): + TestController.__init__(self, *args, **kwargs) + + def setUp(self): + self._setup_models() + self._setup_example_user(gpg=True) + + def tearDown(self): + self._cleanup_mailbox() + self._cleanup_repo() + + def _cleanup_mailbox(self): + """Delete mailbox file""" + + def _cleanup_repo(self): + """Delete all files present in repo directory""" + + def import_package(self, package_dir): + """Run debexpo importer on package_dir/*.changes""" + + def assert_importer_failed(self): + """Assert that the importer has failed""" + + def assert_importer_succeeded(self): + """Assert that the importer has succeeded""" + + def assert_no_email(self): + """Assert that the importer has not generated any email""" + + def assert_email_with(self, search_text): + """ + Assert that the imported would have sent a email to the uploader + containing search_text + """ + + def assert_package_count(self, package, version ,count): + """ + Assert that a package appears count times in debexpo + + If count > 0, this method with also assert that the package is present + in debexpo repository. + """ + diff --git a/debexpo/tests/importer/test_importer.py b/debexpo/tests/importer/test_importer.py new file mode 100644 index 00000000..3ca49f57 --- /dev/null +++ b/debexpo/tests/importer/test_importer.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# +# test_upload.py — UploadController test cases +# +# This file is part of debexpo +# https://salsa.debian.org/mentors.debian.net-team/debexpo +# +# Copyright © 2018 Baptiste BEAUPLAT +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation +# files (the "Software"), to deal in the Software without +# restriction, including without limitation the rights to use, +# copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following +# conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +""" +UploadController test cases. +""" + +__author__ = 'Baptiste BEAUPLAT' +__copyright__ = 'Copyright © 2018 Baptiste BEAUPLAT' +__license__ = 'MIT' + +from debexpo.tests.importer import TestImporterController + +class TestImporter(TestImporterController): + """ + This class tests debexpo's importer. + + Its goal is to process a user upload, validate it and reject it with a email + sent to the user or accepting it and making it available in debexpo repo + """ + + def __init__(self, *args, **kwargs): + TestImporterController.__init__(self, *args, **kwargs) + + def test_import_package_empty_changes(self): + self.import_package('emtpy-changes') + self.assert_importer_failed() + self.assert_no_email() + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_corrupted_changes(self): + self.import_package('corrupted-changes') + self.assert_importer_failed() + self.assert_no_email() + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_missing_file_in_changes(self): + self.import_package('missing-file-in-changes') + self.assert_importer_failed() + self.assert_no_email() + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_no_dsc(self): + self.import_package('no-dsc') + self.assert_importer_failed() + self.assert_email_with('Rejecting incomplete upload.\nYou did not' + ' upload the dsc file\n') + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_not_signed(self): + self.import_package('not-signed') + self.assert_importer_failed() + self.assert_email_with('Your upload does not appear to be signed') + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_unknown_key(self): + self.import_package('unknown-key') + self.assert_importer_failed() + self.assert_email_with('Your upload does not contain a valid' + ' signature.') + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_wrong_gpg_uid(self): + self.import_package('wrong-gpg-uid') + self.assert_importer_failed() + self.assert_email_with('Your GPG key does not match the email used to' + ' register') + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_invalid_dist(self): + self.import_package('invalid-dist') + self.assert_importer_failed() + self.assert_email_with('You are not uploading to one of those Debian' + ' distribution') + self.assert_package_count('hello', '1.0-1', 0) + + def test_import_package_no_orig(self): + self.import_package('no-orig') + self.assert_importer_failed() + self.assert_email_with('Rejecting incomplete upload. You did not' + ' upload any original tarball (orig.tar.gz)') + self.assert_package_count('non-existent', '1.0-1', 0) + + def test_import_package_debian_orig_too_big(self): + self.import_package('debian-orig-too-big') + self.assert_importer_failed() + self.assert_email_with('We did find it on Debian main archive, however' + ' it is too big to be downloaded by our system') + self.assert_package_count('0ad-data', '0.0.23-1', 0) + + def test_import_package_hello(self): + self.import_package('hello') + self.assert_importer_succeeded() + self.assert_email_with("Your upload of the package 'hello' to " + "mentors.debian.net was successful.") + self.assert_package_count('hello', '1.0-1', 1) + + self.import_package('hello') + self.assert_importer_succeeded() + self.assert_email_with("Your upload of the package 'hello' to" + " mentors.debian.net was successful.") + self.assert_package_count('hello', '1.0-1', 2) -- GitLab From fbb102ac0264d5efc9bdc6387505412f52aef6fb Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Sun, 2 Dec 2018 23:47:41 +0100 Subject: [PATCH 02/17] Make debexpo_importer.py callable from python --- bin/__init__.py | 0 bin/debexpo_importer.py | 41 ++++++++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 bin/__init__.py diff --git a/bin/__init__.py b/bin/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/bin/debexpo_importer.py b/bin/debexpo_importer.py index 588143ca..937d5ea8 100755 --- a/bin/debexpo_importer.py +++ b/bin/debexpo_importer.py @@ -179,8 +179,6 @@ class Importer(object): email = Email('importer_fail_admin') self.send_email(email, [pylons.config['debexpo.email']], message=reason) - sys.exit(1) - def _reject(self, reason): """ Reject the package by sending a reason for failure to the log and then remove all @@ -201,7 +199,6 @@ class Importer(object): package = self.changes.get('Source', '') self.send_email(email, [self.user.email], package=package, message=reason) - sys.exit(1) def _setup_logging(self): """ @@ -217,6 +214,7 @@ class Importer(object): # Check for the presence of [loggers] in self.ini_file if not parser.has_section('loggers'): self._fail('Config file does not have [loggers] section', use_log=False) + return 1 logging.config.fileConfig(self.ini_file) @@ -224,7 +222,7 @@ class Importer(object): logger_name = 'debexpo.importer.%s' % os.getpid() log = logging.getLogger(logger_name) - def _setup(self): + def _setup(self, no_env): """ Set up logging, import pylons/paste/debexpo modules, parse config file, create config class and chdir to the incoming directory. @@ -232,15 +230,17 @@ class Importer(object): # Look for ini file if not os.path.isfile(self.ini_file): self._fail('Cannot find ini file') + return 1 self._setup_logging() # Import debexpo root directory sys.path.append(os.path.dirname(self.ini_file)) - # Initialize Pylons app - conf = appconfig('config:' + self.ini_file) - pylons.config = load_environment(conf.global_conf, conf.local_conf) + if not no_env: + # Initialize Pylons app + conf = appconfig('config:' + self.ini_file) + pylons.config = load_environment(conf.global_conf, conf.local_conf) # Change into the incoming directory incoming_dir = pylons.config['debexpo.upload.incoming'] @@ -250,6 +250,7 @@ class Importer(object): # Look for the changes file if not os.path.isfile(self.changes_file): self._fail('Cannot find changes file') + return 1 def _create_db_entries(self, qa): """ @@ -318,6 +319,7 @@ class Importer(object): sum = md5sum(os.path.join(pylons.config['debexpo.repository'], filename)) except AttributeError as e: self._fail("Could not calculate MD5 sum: %s" % (e)) + return 1 size = os.stat(os.path.join(pylons.config['debexpo.repository'], filename))[ST_SIZE] @@ -399,7 +401,7 @@ class Importer(object): return False - def main(self): + def main(self, no_env=False): """ Actually start the import of the package. @@ -407,9 +409,8 @@ class Importer(object): create the database entries for the imported package. """ # Set up importer - self._setup() + self._setup(no_env) - log.debug('Importer started with arguments: %s' % sys.argv[1:]) filecheck = CheckFiles() signature = GnuPG() @@ -422,6 +423,7 @@ class Importer(object): # XXX: The user won't ever see this message. The changes file was # invalid, we don't know whom send it to self._reject("Your changes file appears invalid. Refusing your upload\n%s" % (str(e))) + return 1 # Determine user from changed-by field # This might be temporary, the GPG check should replace the user later @@ -437,20 +439,25 @@ class Importer(object): " item; if you are using dpkg-buildpackage directly" " use the default flags or -S for a source only" " upload)") + return 1 if not self.skip_gpg: # Next, find out whether the changes file was signed with a valid signature, if not reject immediately if not signature.is_signed(self.changes_file): self._reject('Your upload does not appear to be signed') + return 1 (gpg_out, gpg_uids, gpg_status) = signature.verify_sig_full(self.changes_file) if gpg_status != 0: self._reject('Your upload does not contain a valid signature. Output was:\n%s' % (gpg_out)) + return 1 if not self._determine_uploader_by_gpg(gpg_uids): self._reject('Rejecting your upload. Your GPG key does not' ' match the email used to register') + return 1 if self.user.id == -1: self._reject('Couldn\'t find user %s. Exiting.' % self.user.email) + return 1 self.user_id = self.user.id log.debug("User found in database. Has id: %s", self.user.id) @@ -510,6 +517,7 @@ class Importer(object): if distribution not in allowed_distributions: self._reject("You are not uploading to one of those Debian distributions: %s" % (reduce(lambda x,xs: x + " " + xs, allowed_distributions))) + return 1 # Look whether the orig tarball is present, and if not, try and get it from # the repository. @@ -551,7 +559,7 @@ class Importer(object): if post_upload.stop(): log.critical('post-upload plugins failed') self._remove_changes() - sys.exit(1) + return 1 # Check whether a post-upload plugin has got the orig tarball from somewhere. if not orig_file_found and not filecheck.is_native_package(self.changes): @@ -576,6 +584,7 @@ class Importer(object): "re-upload your package to mentors.debian.net, " "including the orig tarball (pass -sa to " "dpkg-buildpackage). Thanks,") + return 1 else: if orig == None: orig = "any original tarball (orig.tar.gz)" @@ -586,24 +595,29 @@ class Importer(object): " Debian revision part, make sure you include the full" " source (pass -sa to dpkg-buildpackage)" % ( orig )) + return 1 else: toinstall.append(orig) # Check whether the debexpo.repository variable is set if 'debexpo.repository' not in pylons.config: self._fail('debexpo.repository not set') + return 1 # Check whether debexpo.repository is a directory if not os.path.isdir(pylons.config['debexpo.repository']): self._fail('debexpo.repository is not a directory') + return 1 # Check whether debexpo.repository is writeable if not os.access(pylons.config['debexpo.repository'], os.W_OK): self._fail('debexpo.repository is not writeable') + return 1 qa = Plugins('qa', self.changes, self.changes_file, user_id=self.user_id) if qa.stop(): self._reject('QA plugins failed the package') + return 1 # Loop through parent directories in the target installation directory to make sure they # all exist. If not, create them. @@ -640,6 +654,7 @@ class Importer(object): r.update() log.debug('Done') + return 0 def main(): @@ -661,10 +676,10 @@ def main(): parser.print_help() sys.exit(0) + log.debug('Importer started with arguments: %s' % sys.argv[1:]) i = Importer(options.changes, options.ini, options.skip_email, options.skip_gpg) - i.main() - return 0 + sys.exit(i.main()) if __name__=='__main__': main() -- GitLab From 945e79bfda1fa0af8c051bfd4dffed781e97f294 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Sun, 2 Dec 2018 23:48:16 +0100 Subject: [PATCH 03/17] Add missing testsmtp to test.ini and fix importer name --- test.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test.ini b/test.ini index 611698ec..4efcd733 100644 --- a/test.ini +++ b/test.ini @@ -32,7 +32,7 @@ debexpo.upload.incoming = /tmp/debexpo/incoming/ debexpo.repository = /tmp/debexpo/files/ # Path to importer script -debexpo.importer = %(here)s/bin/debexpo-importer +debexpo.importer = %(here)s/bin/debexpo_importer.py # Whether to let debexpo handle the /debian/ directory debexpo.handle_debian = true @@ -107,6 +107,9 @@ debexpo.nntp_server = news.gmane.org # Enable experimental and/or broken code debexpo.enable_experimental_code = true +# In testing mode, do not use a real smtp +debexpo.testsmtp = /tmp/debexpo-testing.mbox + # Logging configuration [loggers] keys = root, debexpo -- GitLab From 509b21aca08e864e487a7efd5c579f00bd2e0275 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Sun, 2 Dec 2018 23:49:37 +0100 Subject: [PATCH 04/17] Few implemenation for TestImporterController --- debexpo/tests/importer/__init__.py | 53 +++++++++++++++++++++++++ debexpo/tests/importer/test_importer.py | 6 +++ 2 files changed, 59 insertions(+) diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index 2cd011fc..c887622b 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -32,7 +32,17 @@ __author__ = 'Baptiste BEAUPLAT' __copyright__ = 'Copyright © 2018 Baptiste BEAUPLAT' __license__ = 'MIT' +import pylons + +from debexpo.model.users import User +from debexpo.model import meta +from bin.debexpo_importer import Importer from debexpo.tests import TestController, url +from os import remove +from os.path import isdir, isfile, join, dirname +from shutil import rmtree, copytree +from glob import glob +from subprocess import Popen, PIPE class TestImporterController(TestController): """ @@ -44,38 +54,81 @@ class TestImporterController(TestController): def __init__(self, *args, **kwargs): TestController.__init__(self, *args, **kwargs) + self.data_dir = join(dirname(__file__), 'data') def setUp(self): self._setup_models() self._setup_example_user(gpg=True) def tearDown(self): + self._remove_example_user() self._cleanup_mailbox() self._cleanup_repo() def _cleanup_mailbox(self): """Delete mailbox file""" + if 'debexpo.testsmtp' in pylons.config: + if isfile(pylons.config['debexpo.testsmtp']): + remove(pylons.config['debexpo.testsmtp']) def _cleanup_repo(self): """Delete all files present in repo directory""" + if 'debexpo.repository' in pylons.config: + if isdir(pylons.config['debexpo.repository']): + rmtree(pylons.config['debexpo.repository']) + + def _upload_package(self, package_dir): + """Copy a directory content to incoming queue""" + self.assertTrue('debexpo.upload.incoming' in pylons.config) + self.upload_dir = pylons.config['debexpo.upload.incoming'] + + # copytree dst dir must not exist + if isdir(self.upload_dir): + rmtree(self.upload_dir) + copytree(join(self.data_dir, package_dir), self.upload_dir) def import_package(self, package_dir): """Run debexpo importer on package_dir/*.changes""" + # Copy uplod files to incomming queue + self.assertTrue(isdir(join(self.data_dir, package_dir))) + self._upload_package(package_dir) + + # Get change file + matches = glob(join(self.upload_dir, '*.changes')) + self.assertTrue(len(matches) == 1) + changes = matches[0] + + # Run the importer on change file + importer = Importer(changes, pylons.config['global_conf']['__file__'], + False, False) + self._status_importer = importer.main(no_env=True) def assert_importer_failed(self): """Assert that the importer has failed""" + self.assertFalse(self._status_importer == 0) def assert_importer_succeeded(self): """Assert that the importer has succeeded""" + self.assertTrue(self._status_importer == 0) def assert_no_email(self): """Assert that the importer has not generated any email""" + # This check only works when a file mailbox is configured + self.assertTrue('debexpo.testsmtp' in pylons.config) + + # The mailbox file has not been created + self.assertFalse(isfile(pylons.config['debexpo.testsmtp'])) def assert_email_with(self, search_text): """ Assert that the imported would have sent a email to the uploader containing search_text """ + # This check only works when a file mailbox is configured + self.assertTrue('debexpo.testsmtp' in pylons.config) + + # The mailbox file has been created + self.assertTrue(isfile(pylons.config['debexpo.testsmtp'])) def assert_package_count(self, package, version ,count): """ diff --git a/debexpo/tests/importer/test_importer.py b/debexpo/tests/importer/test_importer.py index 3ca49f57..c63fd847 100644 --- a/debexpo/tests/importer/test_importer.py +++ b/debexpo/tests/importer/test_importer.py @@ -67,6 +67,12 @@ class TestImporter(TestImporterController): self.assert_no_email() self.assert_package_count('hello', '1.0-1', 0) + def test_import_package_wrong_checksum_in_changes(self): + self.import_package('wrong-checksum-in-changes') + self.assert_importer_failed() + self.assert_no_email() + self.assert_package_count('hello', '1.0-1', 0) + def test_import_package_no_dsc(self): self.import_package('no-dsc') self.assert_importer_failed() -- GitLab From 393f5c05cf3952a24584d1c875556c29a71fef28 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Sun, 2 Dec 2018 23:49:58 +0100 Subject: [PATCH 05/17] Add test cases for importer --- .../hello_1.0-1_amd64.changes | 1 + .../emtpy-changes/hello_1.0-1_amd64.changes | 0 .../missing-file-in-changes/hello_1.0-1.dsc | 1 + .../hello_1.0-1_amd64.buildinfo | 1 + .../hello_1.0-1_amd64.changes | 1 + .../hello_1.0-1_amd64.deb | 1 + .../hello_1.0.orig.tar.xz | 1 + .../data/no-dsc/hello_1.0-1.debian.tar.xz | 1 + .../importer/data/no-dsc/hello_1.0-1.dsc | 1 + .../data/no-dsc/hello_1.0-1_amd64.buildinfo | 1 + .../data/no-dsc/hello_1.0-1_amd64.changes | 1 + .../data/no-dsc/hello_1.0-1_amd64.deb | 1 + .../data/no-dsc/hello_1.0.orig.tar.xz | 1 + .../data/sources/hello-1.0/debian/changelog | 5 + .../data/sources/hello-1.0/debian/compat | 1 + .../data/sources/hello-1.0/debian/control | 15 ++ .../data/sources/hello-1.0/debian/copyright | 36 ++++ .../data/sources/hello-1.0/debian/rules | 25 +++ .../sources/hello-1.0/debian/source/format | 1 + .../data/sources/hello_1.0-1.debian.tar.xz | Bin 0 -> 7808 bytes .../importer/data/sources/hello_1.0-1.dsc | 20 +++ .../data/sources/hello_1.0-1_amd64.buildinfo | 159 ++++++++++++++++++ .../data/sources/hello_1.0-1_amd64.changes | 34 ++++ .../hello_1.0-1_amd64.changes-corrupted | 34 ++++ .../sources/hello_1.0-1_amd64.changes-no-dsc | 31 ++++ .../sources/hello_1.0-1_amd64.changes-no-orig | 34 ++++ .../hello_1.0-1_amd64.changes-not-signed | 34 ++++ .../hello_1.0-1_amd64.changes-wrong-checksum | 34 ++++ .../data/sources/hello_1.0-1_amd64.deb | Bin 0 -> 2316 bytes .../data/sources/hello_1.0.orig.tar.xz | Bin 0 -> 168 bytes .../hello_1.0-1.debian.tar.xz | 1 + .../wrong-checksum-in-changes/hello_1.0-1.dsc | 1 + .../hello_1.0-1_amd64.buildinfo | 1 + .../hello_1.0-1_amd64.changes | 1 + .../hello_1.0-1_amd64.deb | 1 + .../hello_1.0.orig.tar.xz | 1 + 36 files changed, 481 insertions(+) create mode 120000 debexpo/tests/importer/data/corrupted-changes/hello_1.0-1_amd64.changes create mode 100644 debexpo/tests/importer/data/emtpy-changes/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/missing-file-in-changes/hello_1.0.orig.tar.xz create mode 120000 debexpo/tests/importer/data/no-dsc/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/no-dsc/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/no-dsc/hello_1.0.orig.tar.xz create mode 100644 debexpo/tests/importer/data/sources/hello-1.0/debian/changelog create mode 100644 debexpo/tests/importer/data/sources/hello-1.0/debian/compat create mode 100644 debexpo/tests/importer/data/sources/hello-1.0/debian/control create mode 100644 debexpo/tests/importer/data/sources/hello-1.0/debian/copyright create mode 100755 debexpo/tests/importer/data/sources/hello-1.0/debian/rules create mode 100644 debexpo/tests/importer/data/sources/hello-1.0/debian/source/format create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.debian.tar.xz create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-corrupted create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-dsc create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-not-signed create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-checksum create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.deb create mode 100644 debexpo/tests/importer/data/sources/hello_1.0.orig.tar.xz create mode 120000 debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0.orig.tar.xz diff --git a/debexpo/tests/importer/data/corrupted-changes/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/corrupted-changes/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..ec61d3da --- /dev/null +++ b/debexpo/tests/importer/data/corrupted-changes/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-corrupted \ No newline at end of file diff --git a/debexpo/tests/importer/data/emtpy-changes/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/emtpy-changes/hello_1.0-1_amd64.changes new file mode 100644 index 00000000..e69de29b diff --git a/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1.dsc b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1.dsc new file mode 120000 index 00000000..8c773310 --- /dev/null +++ b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc \ No newline at end of file diff --git a/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..59c6a5e9 --- /dev/null +++ b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo \ No newline at end of file diff --git a/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..382e9f52 --- /dev/null +++ b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes \ No newline at end of file diff --git a/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/missing-file-in-changes/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-dsc/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/no-dsc/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/no-dsc/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-dsc/hello_1.0-1.dsc b/debexpo/tests/importer/data/no-dsc/hello_1.0-1.dsc new file mode 120000 index 00000000..8c773310 --- /dev/null +++ b/debexpo/tests/importer/data/no-dsc/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..59c6a5e9 --- /dev/null +++ b/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..68adc1e1 --- /dev/null +++ b/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-no-dsc \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/no-dsc/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-dsc/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/no-dsc/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/no-dsc/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/sources/hello-1.0/debian/changelog b/debexpo/tests/importer/data/sources/hello-1.0/debian/changelog new file mode 100644 index 00000000..591fa373 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello-1.0/debian/changelog @@ -0,0 +1,5 @@ +hello (1.0-1) unstable; urgency=medium + + * Initial release (Closes: #nnnn) + + -- Baptiste BEAUPLAT Sun, 02 Dec 2018 22:38:11 +0100 diff --git a/debexpo/tests/importer/data/sources/hello-1.0/debian/compat b/debexpo/tests/importer/data/sources/hello-1.0/debian/compat new file mode 100644 index 00000000..b4de3947 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello-1.0/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debexpo/tests/importer/data/sources/hello-1.0/debian/control b/debexpo/tests/importer/data/sources/hello-1.0/debian/control new file mode 100644 index 00000000..1388da09 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello-1.0/debian/control @@ -0,0 +1,15 @@ +Source: hello +Section: unknown +Priority: optional +Maintainer: Baptiste BEAUPLAT +Build-Depends: debhelper (>= 11) +Standards-Version: 4.1.3 +Homepage: +#Vcs-Browser: https://salsa.debian.org/debian/hello +#Vcs-Git: https://salsa.debian.org/debian/hello.git + +Package: hello +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + diff --git a/debexpo/tests/importer/data/sources/hello-1.0/debian/copyright b/debexpo/tests/importer/data/sources/hello-1.0/debian/copyright new file mode 100644 index 00000000..30ebf9e4 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello-1.0/debian/copyright @@ -0,0 +1,36 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: hello +Source: + +Files: * +Copyright: + +License: MIT + +Files: debian/* +Copyright: 2018 Baptiste BEAUPLAT +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid picking licenses with terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/debexpo/tests/importer/data/sources/hello-1.0/debian/rules b/debexpo/tests/importer/data/sources/hello-1.0/debian/rules new file mode 100755 index 00000000..e1c367c1 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello-1.0/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + + +%: + dh $@ + + +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) + diff --git a/debexpo/tests/importer/data/sources/hello-1.0/debian/source/format b/debexpo/tests/importer/data/sources/hello-1.0/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello-1.0/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/sources/hello_1.0-1.debian.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..47a0e7d0e7c12ebd0e421d87054f41c4132f097a GIT binary patch literal 7808 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 S<3=yB#Ao{g000001X)^#xhsYM literal 0 HcmV?d00001 diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc new file mode 100644 index 00000000..32ab42a1 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc @@ -0,0 +1,20 @@ +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 168 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo new file mode 100644 index 00000000..4d2229d9 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo @@ -0,0 +1,159 @@ +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + a77f08151b482ddd66141744fe1e2312 784 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes new file mode 100644 index 00000000..c684b2c6 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + a77f08151b482ddd66141744fe1e2312 784 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-corrupted b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-corrupted new file mode 100644 index 00000000..bd91e709 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-corrupted @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +CORRUPTEDDistribution: unstable +Urgency: medium +CORRUPTEDMaintainer: Baptiste BEAUPLAT +CORRUPTEDChanged-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + a77f08151b482ddd66141744fe1e2312 784 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-dsc b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-dsc new file mode 100644 index 00000000..b24ff4ea --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-dsc @@ -0,0 +1,31 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig new file mode 100644 index 00000000..c684b2c6 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + a77f08151b482ddd66141744fe1e2312 784 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-not-signed b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-not-signed new file mode 100644 index 00000000..c684b2c6 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-not-signed @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + a77f08151b482ddd66141744fe1e2312 784 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-checksum b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-checksum new file mode 100644 index 00000000..ac66b5ec --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-checksum @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 784 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 784 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 784 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.deb new file mode 100644 index 0000000000000000000000000000000000000000..394cd6887a0997e4beb483f3e0847a195a1a5a00 GIT binary patch literal 2316 zcmbW&cQ70X7Xa{8mqoO!608!DW%b@yi)g28jLv42thy^plywqhmFVr`M6{@<1uLQx zgMc$!bmuKU{JVV z0RaIS1$j9oWkp35836(5>;Au0Mp{}?US2@pI{y<7L9&w4AQvpgABXjp^he<&gYf^n zub`y(*ZzeP-o_39pk5iT*Qf5hqzW?^q~HMj8Or>74dlC56i1E#PKH+AP>O$b@)>Cc zgS!Sr3T@SA3EGu_U?}sv68vloz;a=|gv%4zBG&A6_>}pJ-1+64$KnAp7hAVH8k&Yl z44|5ho;9m<=Z;x-qL}4KXA>`|oO9ZcpXZd>tba{Ra#^R0jV&a`s!wpn8J;yX26A8C zYfH*ld|u>fOFPg(;&j+cfrk?VY=Ok8WZwe2!WX1{(^gE<4Wl z#-2*b(+olUi-z2=@N*eXxo^9s2y5dNnr!d*s5wzC6EX*6KqrWK zNw9VBEV_nmP;=)<<&t(BXzb8(mZ-n~icxCXj_?S;B?0n?cePs6*yqXklw$PLp437z zHOj1BwsU3`!HPDCX%3eQFH;l`JZWW#iTt|0$n&m2N*R6UfuM~K+ zjBW(jD#$F(o&>8DGNoy^xBSXq^RpQ+FysAEC%Aa(td?Cxh4e}l4Rnz{L$E?(`sSnG z!AEU3*H?vvDAW~zp^lU^zX4FtYX-wFFWf|b+&2VJyrd2@2LOn39~o+U(C3u@CPHm% z=Zf-2{RQt@)j!$2o-6-}?;+@a?F};g-JXewVac^Unx6mPUIXl^w|#)acP%7yHrHv+ zI94784y@IqD{*gRuiLZ-Lf4K>edTas;)0Y2KTvL+!+fG4o6nxu$%wSegNukszu)tc zJ;{yL`+10?9o}YS*kNM~`kw^QdcuU0{8$o8%gLDggi3u|lH-Y&s6GbbI zX{Q%kK0iL${n8k9GZJ<~QhQ6E37nGvPs{x-H`Kefu0)PEL^6r#YVdz?v?d#}aN#s= z<_t9$S;nT3=sSz$ClHf7j)77Zhck1n-uN05CQT0)KI899og6#Jlt*0V=*oaKYl^e| z?{~W5t1PbdJ%c?7@RETK(o}&9*ZydcoSa9 z83&%y9z`$NGA#-pVJmKZ{y>&{yNTPR?|vRMuZvc126NkWX}{$m?qB$ct-JR&FqC)w z^f`T8!C(te3{2Ws5tY|$ev(T(BARz@j0LhU^jd!cda#5n>Bx>CO0^DQeLLO8cS8cc=R2p3`s@?D29mv+ zrM}#01-D&rAX#!5__$SNeK=!zFx&lyT&UB2x9*Q?VMCowr)_E-Wgz8ai*zq<=7GYx z_L;V^=j{(KHiMjmZmYoNN7@SX=xs=0dcK;*w*lbn`(~4BH76?#EJw$*?VfK%c1?KT zvGWvGX}4@!UM)!jwj^MZfmZ3aMFd%=`Hbt=>NbqsoWpQ;H6JT!R7Q;CJKaF4pTD@0 zMeypZuK4XV(aT3B;t}WJ<%!X@5>F)cF-9b#dqV@^nrsNiAXuIPM0B-(Sv0QtVdf&E z!vdka9J-zMgLTAMy7+Yw`6%~^+CVK?NIUhJlltf|RvDr#Z~rE`b+VD3xP4Y$Jd^Tj zjJ_!%Yl4Qp1EeIH3`2k-IFG;e3l2W0Kz=x9ha52IJ2Stq!dq8KwI;G56*E(iFtbRn z;^b74$ZR@`;g3waGSyxwgG+F#u0uS5HQcp3z#az)FiufcVbjaa@W=SmO+gr z_UtFoOCI5~bgy}*oS(8mZL^*Vr@z716cB)3C_Lzo}|O+ANG;>Cxa69anp zN@mqsDvmM?*>696xtzXe7s9AEZdGspq`h42j4@|`#P5k!@j)=nQ%BLSs(T#1 zBcAOqVF1lLWo=3x6yK_KBk7qvqKoG94Bc?BISK9Kc zaL1@;!o=$ojzZBqjS5+D=o+>5Jlh%NmS6ilF{>G2Qm7J=XsWHqQOm`6Ildvuuvgyc~T2mB1ZJMw}eP z|1P_o;a_S!?!gTq_1F3fwSQVPJOcb!q6K~>7gDYC6;NgBOcn{b|GH-NY!w+9l|{ro z=hdS5-*(SF^ElSkL9=Y^taSuikzkcmLFXZrfR?LxkT?JU0001!#*BEsGx+lW0f7O4 WPyhg%qCBdx#Ao{g000001X)@ynnuk4 literal 0 HcmV?d00001 diff --git a/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.dsc b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.dsc new file mode 120000 index 00000000..8c773310 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..59c6a5e9 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..ca0b0299 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-wrong-checksum \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-checksum-in-changes/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file -- GitLab From cb824b40c6b0d93cd0eedbdb8b8082ed80ff83f7 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 21:52:07 +0100 Subject: [PATCH 06/17] Add assert_package_count and assert_email_with in TestImporterController --- debexpo/tests/importer/__init__.py | 38 ++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index c887622b..039cbafe 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -34,16 +34,19 @@ __license__ = 'MIT' import pylons -from debexpo.model.users import User -from debexpo.model import meta -from bin.debexpo_importer import Importer -from debexpo.tests import TestController, url +from email import message_from_file +from glob import glob from os import remove from os.path import isdir, isfile, join, dirname from shutil import rmtree, copytree -from glob import glob from subprocess import Popen, PIPE +from bin.debexpo_importer import Importer +from debexpo.model import meta +from debexpo.model.package_versions import PackageVersion +from debexpo.model.packages import Package +from debexpo.tests import TestController, url + class TestImporterController(TestController): """ Toolbox for importer tests @@ -87,6 +90,15 @@ class TestImporterController(TestController): rmtree(self.upload_dir) copytree(join(self.data_dir, package_dir), self.upload_dir) + def _get_email(self): + """Parse an email and format the body.""" + email = None + + # Load mailbox + with open(pylons.config['debexpo.testsmtp'], 'r') as mbox: + email = message_from_file(mbox) + return email + def import_package(self, package_dir): """Run debexpo importer on package_dir/*.changes""" # Copy uplod files to incomming queue @@ -130,11 +142,23 @@ class TestImporterController(TestController): # The mailbox file has been created self.assertTrue(isfile(pylons.config['debexpo.testsmtp'])) - def assert_package_count(self, package, version ,count): + # Get the email and assert that the body contains search_text + email = self._get_email() + self.assertTrue(search_text in email.get_payload()) + + def assert_package_count(self, package_name, version, count): """ Assert that a package appears count times in debexpo If count > 0, this method with also assert that the package is present in debexpo repository. """ - + package = meta.session.query(Package).filter(Package.name == + package_name).all() + if package: + count_in_db = \ + meta.session.query(PackageVersion).filter(PackageVersion.package_id + == version and PackageVersion.version == version).count() + else: + count_in_db = 0 + self.assertTrue(count_in_db == count) -- GitLab From a0301f50370543cfb8e8133abf66730b195cac54 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 22:08:13 +0100 Subject: [PATCH 07/17] Add importer test no-orig --- debexpo/tests/importer/__init__.py | 2 +- .../data/no-orig/hello_1.0-1.debian.tar.xz | 1 + .../importer/data/no-orig/hello_1.0-1.dsc | 1 + .../data/no-orig/hello_1.0-1_amd64.buildinfo | 1 + .../data/no-orig/hello_1.0-1_amd64.changes | 1 + .../data/no-orig/hello_1.0-1_amd64.deb | 1 + .../data/no-orig/hello_1.0.orig.tar.xz | 1 + .../data/sources/hello_1.0-1.dsc-no-orig | 28 +++ .../hello_1.0-1_amd64.buildinfo-signed | 170 ++++++++++++++++++ .../sources/hello_1.0-1_amd64.changes-no-orig | 26 ++- 10 files changed, 222 insertions(+), 10 deletions(-) create mode 120000 debexpo/tests/importer/data/no-orig/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/no-orig/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/no-orig/hello_1.0.orig.tar.xz create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index 039cbafe..8cd82579 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -144,7 +144,7 @@ class TestImporterController(TestController): # Get the email and assert that the body contains search_text email = self._get_email() - self.assertTrue(search_text in email.get_payload()) + self.assertTrue(search_text in email.get_payload(decode=True)) def assert_package_count(self, package_name, version, count): """ diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/no-orig/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/no-orig/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0-1.dsc b/debexpo/tests/importer/data/no-orig/hello_1.0-1.dsc new file mode 120000 index 00000000..a2303e19 --- /dev/null +++ b/debexpo/tests/importer/data/no-orig/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc-no-orig \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..148a1e54 --- /dev/null +++ b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo-signed \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..be7b909c --- /dev/null +++ b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-no-orig \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/no-orig/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/no-orig/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig new file mode 100644 index 00000000..afe221a0 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig @@ -0,0 +1,28 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWZVQAKCRDENHgc6HHz +39ABAQCcB2l+Va1B1MzmZy/PrGxiONmzXGAEa5FZevQ09CqlpQEArvmA5s7BFpDf +8/9uvUcl45Ps8dhcFuzLwKqrpROL6QA= +=rk7E +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed new file mode 100644 index 00000000..704e72f4 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed @@ -0,0 +1,170 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + a11fd48e3861ffea6e14e2dd8594f43d 842 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + 76c8fcd8adb93cc9a6be5a6f54c360195c893b8d 842 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 46316d9583255ef9fd686f24da5a044427e754589f7486f97cce1d9eb1bad190 842 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWZVQAKCRDENHgc6HHz +37xkAQCT2xyBWEPnKl8jtHDZTJqb0aRBbVXJFRN9mDsdjDECYwEAjkm+AGNIC/+z +LuZ35ghQiFqBK0W0ggrI7pacj0bQDg0= +=HLuD +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig index c684b2c6..08320eef 100644 --- a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + Format: 1.8 Date: Sun, 02 Dec 2018 22:38:11 +0100 Source: hello @@ -15,20 +18,25 @@ Changes: . * Initial release (Closes: #nnnn) Checksums-Sha1: - 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc - be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 76c8fcd8adb93cc9a6be5a6f54c360195c893b8d 842 hello_1.0-1.dsc 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz - 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + edc6aef63dea4d064ad86b62206f6f06f2285c40 4623 hello_1.0-1_amd64.buildinfo 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb Checksums-Sha256: - 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc - 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 46316d9583255ef9fd686f24da5a044427e754589f7486f97cce1d9eb1bad190 842 hello_1.0-1.dsc 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz - 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + 6d36af5bf1ea26e9d70da4ad0683d5dfc100278a725cf6c36f3f41012329dbbe 4623 hello_1.0-1_amd64.buildinfo c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb Files: - a77f08151b482ddd66141744fe1e2312 784 unknown optional hello_1.0-1.dsc - 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + a11fd48e3861ffea6e14e2dd8594f43d 842 unknown optional hello_1.0-1.dsc 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz - 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 898763eb2836c78ed2b512d117793228 4623 unknown optional hello_1.0-1_amd64.buildinfo 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWZVQAKCRDENHgc6HHz +30ZkAQD3/oku8EAnqTgE04gWVqWGU9BtTo6GwsfblxAch1UW2AD9Ho/Haw9ywL1j +jdj4Gv74JSJt/pVepbKf4E7tqEpHKQM= +=GIRO +-----END PGP SIGNATURE----- -- GitLab From a11f7027dffa23c35967367ec56cec77548ab19b Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 22:16:12 +0100 Subject: [PATCH 08/17] Add importer test not-signed and unknown-key --- .../data/not-signed/hello_1.0-1.debian.tar.xz | 1 + .../importer/data/not-signed/hello_1.0-1.dsc | 1 + .../not-signed/hello_1.0-1_amd64.buildinfo | 1 + .../data/not-signed/hello_1.0-1_amd64.changes | 1 + .../data/not-signed/hello_1.0-1_amd64.deb | 1 + .../data/not-signed/hello_1.0.orig.tar.xz | 1 + .../data/sources/hello_1.0-1.dsc-unknown-key | 31 ++++ .../hello_1.0-1_amd64.buildinfo-unknown-key | 170 ++++++++++++++++++ .../hello_1.0-1_amd64.changes-unknown-key | 45 +++++ .../unknown-key/hello_1.0-1.debian.tar.xz | 1 + .../importer/data/unknown-key/hello_1.0-1.dsc | 1 + .../unknown-key/hello_1.0-1_amd64.buildinfo | 1 + .../unknown-key/hello_1.0-1_amd64.changes | 1 + .../data/unknown-key/hello_1.0-1_amd64.deb | 1 + .../data/unknown-key/hello_1.0.orig.tar.xz | 1 + 15 files changed, 258 insertions(+) create mode 120000 debexpo/tests/importer/data/not-signed/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/not-signed/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/not-signed/hello_1.0.orig.tar.xz create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc-unknown-key create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-unknown-key create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-unknown-key create mode 120000 debexpo/tests/importer/data/unknown-key/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/unknown-key/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/unknown-key/hello_1.0.orig.tar.xz diff --git a/debexpo/tests/importer/data/not-signed/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/not-signed/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/not-signed/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/not-signed/hello_1.0-1.dsc b/debexpo/tests/importer/data/not-signed/hello_1.0-1.dsc new file mode 120000 index 00000000..8c773310 --- /dev/null +++ b/debexpo/tests/importer/data/not-signed/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc \ No newline at end of file diff --git a/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..59c6a5e9 --- /dev/null +++ b/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo \ No newline at end of file diff --git a/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..c5c0cb4a --- /dev/null +++ b/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-not-signed \ No newline at end of file diff --git a/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/not-signed/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/not-signed/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/not-signed/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/not-signed/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-unknown-key b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-unknown-key new file mode 100644 index 00000000..58118a81 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-unknown-key @@ -0,0 +1,31 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 168 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +iIcEARYIAC8WIQQt4kiVMTxdp/CJ4U4XSUsQeV3XMwUCXAWcaxEcbHlrbm9kZUBj +aWxnLm9yZwAKCRAXSUsQeV3XMw59AP9JyVpQaCBGq1Pjx27JNnQIQcCU7GJgfY1B +Ib1dSBjG2AEA17xjdntsVqEdmdpdy2sWFfhSNie/k5Sn3n8Zcc+hwwk= +=fdtL +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-unknown-key b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-unknown-key new file mode 100644 index 00000000..18f21fef --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-unknown-key @@ -0,0 +1,170 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + 4bda047b0b5feacb9b2a083c49e9e283 1086 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + a66c0bc7ef7b2141309da011dc93f95fa8aa5c5e 1086 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 945ca469a0b1418a50de37a9e80250fc040e39d3c5e6a7c5d266e5fe41094615 1086 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" + +-----BEGIN PGP SIGNATURE----- + +iIcEARYIAC8WIQQt4kiVMTxdp/CJ4U4XSUsQeV3XMwUCXAWcaxEcbHlrbm9kZUBj +aWxnLm9yZwAKCRAXSUsQeV3XM9IDAP9g5SEYRgY55Ky8wzfUsbKWrE84x5fG/EnQ +feK14TiMSQD+LhOlvcPGe+c03m8noysoKTGa7FJncZ6D+ARfoIa1CAs= +=Eqer +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-unknown-key b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-unknown-key new file mode 100644 index 00000000..aea51217 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-unknown-key @@ -0,0 +1,45 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + a66c0bc7ef7b2141309da011dc93f95fa8aa5c5e 1086 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 5f5cd60fee487dda63627c6313c55a9c38349baf 4650 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 945ca469a0b1418a50de37a9e80250fc040e39d3c5e6a7c5d266e5fe41094615 1086 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 8dc42df212c4eee5108188e69c38c070c77acff45c2b574e037d4d595984f097 4650 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + 4bda047b0b5feacb9b2a083c49e9e283 1086 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + e95955eeb29eb8d36a2616c6fa9b2a84 4650 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb + +-----BEGIN PGP SIGNATURE----- + +iIcEARYIAC8WIQQt4kiVMTxdp/CJ4U4XSUsQeV3XMwUCXAWcbBEcbHlrbm9kZUBj +aWxnLm9yZwAKCRAXSUsQeV3XM9qFAP4qgQHweo+E6f81KOHYS68lPIVxAafc4wGo +h4ShdtmouQD/Q2/lnG2vwsV5bJlQeTKWgnAo6p/euWMcggYuZ1DcmQ0= +=7oje +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/unknown-key/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/unknown-key/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/unknown-key/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/unknown-key/hello_1.0-1.dsc b/debexpo/tests/importer/data/unknown-key/hello_1.0-1.dsc new file mode 120000 index 00000000..91476cb6 --- /dev/null +++ b/debexpo/tests/importer/data/unknown-key/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc-unknown-key \ No newline at end of file diff --git a/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..deb80768 --- /dev/null +++ b/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo-unknown-key \ No newline at end of file diff --git a/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..96acaf95 --- /dev/null +++ b/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-unknown-key \ No newline at end of file diff --git a/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/unknown-key/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/unknown-key/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/unknown-key/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/unknown-key/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file -- GitLab From 084ff763b58fe9ca5ee5e5655bb4af7f50a410f2 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 22:55:09 +0100 Subject: [PATCH 09/17] Fix non idempotent tests --- debexpo/tests/functional/test_upload.py | 7 ++++++- debexpo/tests/importer/__init__.py | 2 ++ debexpo/tests/test_changes.py | 5 +++-- debexpo/tests/test_utils.py | 3 ++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/debexpo/tests/functional/test_upload.py b/debexpo/tests/functional/test_upload.py index 5d6d61fb..55a64558 100644 --- a/debexpo/tests/functional/test_upload.py +++ b/debexpo/tests/functional/test_upload.py @@ -54,9 +54,13 @@ class TestUploadController(TestController): def setUp(self): self._setup_models() self._setup_example_user() + self.incoming = pylons.test.pylonsapp.config['debexpo.upload.incoming'] + if not os.path.isdir(os.path.join(pylons.test.pylonsapp.config['debexpo.upload.incoming'], 'pub')): + os.makedirs(os.path.join(pylons.test.pylonsapp.config['debexpo.upload.incoming'], 'pub')) def tearDown(self): self._remove_example_user() + pylons.test.pylonsapp.config['debexpo.upload.incoming'] = self.incoming def testGetRequest(self): """ @@ -143,13 +147,14 @@ class TestUploadController(TestController): """ Tests whether an uploads without debexpo.upload.incoming fails. """ - pylons.test.pylonsapp.config.pop('debexpo.upload.incoming') + incoming = pylons.test.pylonsapp.config.pop('debexpo.upload.incoming') response = self.app.put(url( controller='upload', action='index', filename='testfile.dsc'), params='contents', expect_errors=True) + self.assertEqual(response.status_int, 500) def testUploadNonexistantQueue(self): diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index 8cd82579..11dde3f7 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -62,6 +62,8 @@ class TestImporterController(TestController): def setUp(self): self._setup_models() self._setup_example_user(gpg=True) + self._cleanup_mailbox() + self._cleanup_repo() def tearDown(self): self._remove_example_user() diff --git a/debexpo/tests/test_changes.py b/debexpo/tests/test_changes.py index b74f6ff7..3ab8365b 100644 --- a/debexpo/tests/test_changes.py +++ b/debexpo/tests/test_changes.py @@ -35,6 +35,7 @@ __author__ = 'Jonny Lamb' __copyright__ = 'Copyright © 2008 Jonny Lamb' __license__ = 'MIT' +import os from unittest import TestCase from debexpo.lib.changes import Changes @@ -53,11 +54,11 @@ class TestChangesController(TestCase): """ Tests whether the two ways of creating a Changes object output the same result. """ - f = open('debexpo/tests/changes/synce-hal_0.1-1_source.changes') + f = open(os.path.dirname(__file__) + '/changes/synce-hal_0.1-1_source.changes') contents = f.read() f.close() - a = Changes(filename='debexpo/tests/changes/synce-hal_0.1-1_source.changes') + a = Changes(filename=os.path.dirname(__file__) + '/changes/synce-hal_0.1-1_source.changes') b = Changes(string=contents) self.assertEqual(a['Source'], b['Source']) diff --git a/debexpo/tests/test_utils.py b/debexpo/tests/test_utils.py index 8e37067a..0b62f035 100644 --- a/debexpo/tests/test_utils.py +++ b/debexpo/tests/test_utils.py @@ -35,6 +35,7 @@ __author__ = 'Jonny Lamb' __copyright__ = 'Copyright © 2008 Jonny Lamb' __license__ = 'MIT' +import os from unittest import TestCase from debexpo.lib.utils import * @@ -80,4 +81,4 @@ class TestUtilsController(TestCase): """ Tests debexpo.lib.utils.md5sum. """ - self.assertEqual(md5sum('debexpo/tests/changes/synce-hal_0.1-1_source.changes'), 'fbb0b9c81f8a4fa9b8e3b789cf3b5220') + self.assertEqual(md5sum(os.path.dirname(__file__) + '/changes/synce-hal_0.1-1_source.changes'), 'fbb0b9c81f8a4fa9b8e3b789cf3b5220') -- GitLab From 76f4aa1e7f0f37edcfea8ac32aec396c4000f201 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 23:13:48 +0100 Subject: [PATCH 10/17] Update data files for hello and no-orig importer tests --- .../data/hello/hello_1.0-1.debian.tar.xz | 1 + .../tests/importer/data/hello/hello_1.0-1.dsc | 1 + .../data/hello/hello_1.0-1_amd64.buildinfo | 1 + .../data/hello/hello_1.0-1_amd64.changes | 1 + .../importer/data/hello/hello_1.0-1_amd64.deb | 1 + .../importer/data/hello/hello_1.0.orig.tar.xz | 1 + .../data/no-orig/hello_1.0-1_amd64.buildinfo | 2 +- .../data/sources/hello_1.0-1.dsc-no-orig | 8 +- .../data/sources/hello_1.0-1.dsc-signed | 31 ++++ .../hello_1.0-1_amd64.buildinfo-no-orig | 170 ++++++++++++++++++ .../hello_1.0-1_amd64.buildinfo-signed | 14 +- .../sources/hello_1.0-1_amd64.changes-no-orig | 20 +-- .../sources/hello_1.0-1_amd64.changes-signed | 45 +++++ 13 files changed, 274 insertions(+), 22 deletions(-) create mode 120000 debexpo/tests/importer/data/hello/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/hello/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/hello/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/hello/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/hello/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/hello/hello_1.0.orig.tar.xz create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc-signed create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-no-orig create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-signed diff --git a/debexpo/tests/importer/data/hello/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/hello/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/hello/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/hello/hello_1.0-1.dsc b/debexpo/tests/importer/data/hello/hello_1.0-1.dsc new file mode 120000 index 00000000..0bf8a390 --- /dev/null +++ b/debexpo/tests/importer/data/hello/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc-signed \ No newline at end of file diff --git a/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..148a1e54 --- /dev/null +++ b/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo-signed \ No newline at end of file diff --git a/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..296af24c --- /dev/null +++ b/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-signed \ No newline at end of file diff --git a/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/hello/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/hello/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/hello/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/hello/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo index 148a1e54..ca79f1bf 120000 --- a/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo +++ b/debexpo/tests/importer/data/no-orig/hello_1.0-1_amd64.buildinfo @@ -1 +1 @@ -../sources/hello_1.0-1_amd64.buildinfo-signed \ No newline at end of file +../sources/hello_1.0-1_amd64.buildinfo-no-orig \ No newline at end of file diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig index afe221a0..f34188cf 100644 --- a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-no-orig @@ -21,8 +21,8 @@ Files: -----BEGIN PGP SIGNATURE----- -iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWZVQAKCRDENHgc6HHz -39ABAQCcB2l+Va1B1MzmZy/PrGxiONmzXGAEa5FZevQ09CqlpQEArvmA5s7BFpDf -8/9uvUcl45Ps8dhcFuzLwKqrpROL6QA= -=rk7E +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWpsAAKCRDENHgc6HHz +34GrAPsFsPJbCtQfcCbn1e/yXBNzWA4DcZ5qTUv5BIuwOzLndgD/eqnn0Ljd25LB +G5/0FSm3ttvdIhFa3HsJKQMti5oeIgc= +=9Lc+ -----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-signed b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-signed new file mode 100644 index 00000000..77c8e119 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-signed @@ -0,0 +1,31 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 168 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWoQQAKCRDENHgc6HHz +3ysYAQDMUeHp1mKLtoHSS155O4QBRGF7FC/2YBNM8FJwECHuAwD9EyyYFMkBl+rO +zHq9/OoewResJpTCAzw+KR6J6KS8ugg= +=Msfi +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-no-orig b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-no-orig new file mode 100644 index 00000000..0cb99973 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-no-orig @@ -0,0 +1,170 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + fd38015ad4958ff23ecc138d87b9fff8 842 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + 825dd4ad73600f5b90f9e3fa6a9b8b7b5d3f6c03 842 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 55d9d9f0c1a6622ab7d907022821c489f9e349eef127f2f52977753278974d37 842 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWpsAAKCRDENHgc6HHz +31+lAQCu2CuooOgNAKtGbXhu9x2FHE9K/qIrwxDErOnnPHgGQAEA+wAmuqceMuNX +2lPAwOfKv32VNckgzDvcfJlfEB1RhA4= +=PWAQ +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed index 704e72f4..c43d6d43 100644 --- a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-signed @@ -7,13 +7,13 @@ Binary: hello Architecture: amd64 source Version: 1.0-1 Checksums-Md5: - a11fd48e3861ffea6e14e2dd8594f43d 842 hello_1.0-1.dsc + e2d4e2ad265f5f51b6fc510f93fb4057 1062 hello_1.0-1.dsc 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb Checksums-Sha1: - 76c8fcd8adb93cc9a6be5a6f54c360195c893b8d 842 hello_1.0-1.dsc + c59b78b30b9c8a143bab393433634670df2da633 1062 hello_1.0-1.dsc 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb Checksums-Sha256: - 46316d9583255ef9fd686f24da5a044427e754589f7486f97cce1d9eb1bad190 842 hello_1.0-1.dsc + 02b78e4ca364c71c990ad77b1648feba0360845643a7ca115695fb1337756356 1062 hello_1.0-1.dsc c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb Build-Origin: Debian Build-Architecture: amd64 @@ -163,8 +163,8 @@ Environment: -----BEGIN PGP SIGNATURE----- -iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWZVQAKCRDENHgc6HHz -37xkAQCT2xyBWEPnKl8jtHDZTJqb0aRBbVXJFRN9mDsdjDECYwEAjkm+AGNIC/+z -LuZ35ghQiFqBK0W0ggrI7pacj0bQDg0= -=HLuD +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWoQQAKCRDENHgc6HHz +3+2YAQDRYiQ9UAnoi0qtZ9CNk+sSiljWI8cZF2my4aI5mv3kWwEA1oTGq3D75DSE +ndtrUHg+/k5hazO5Dn3mUbnir0iu0Qw= +=dwkq -----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig index 08320eef..38d923ca 100644 --- a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-no-orig @@ -18,25 +18,25 @@ Changes: . * Initial release (Closes: #nnnn) Checksums-Sha1: - 76c8fcd8adb93cc9a6be5a6f54c360195c893b8d 842 hello_1.0-1.dsc + 825dd4ad73600f5b90f9e3fa6a9b8b7b5d3f6c03 842 hello_1.0-1.dsc 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz - edc6aef63dea4d064ad86b62206f6f06f2285c40 4623 hello_1.0-1_amd64.buildinfo + 7bbf2274225b7442359ee7f2457d72e58e43bb48 4623 hello_1.0-1_amd64.buildinfo 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb Checksums-Sha256: - 46316d9583255ef9fd686f24da5a044427e754589f7486f97cce1d9eb1bad190 842 hello_1.0-1.dsc + 55d9d9f0c1a6622ab7d907022821c489f9e349eef127f2f52977753278974d37 842 hello_1.0-1.dsc 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz - 6d36af5bf1ea26e9d70da4ad0683d5dfc100278a725cf6c36f3f41012329dbbe 4623 hello_1.0-1_amd64.buildinfo + e02d7d0ae7ff5c026a007ffa533a742fb62b28d18f3739c26d17406eb155c50a 4623 hello_1.0-1_amd64.buildinfo c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb Files: - a11fd48e3861ffea6e14e2dd8594f43d 842 unknown optional hello_1.0-1.dsc + fd38015ad4958ff23ecc138d87b9fff8 842 unknown optional hello_1.0-1.dsc 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz - 898763eb2836c78ed2b512d117793228 4623 unknown optional hello_1.0-1_amd64.buildinfo + 60677f972a55c862b3cb3342b0db26c6 4623 unknown optional hello_1.0-1_amd64.buildinfo 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb -----BEGIN PGP SIGNATURE----- -iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWZVQAKCRDENHgc6HHz -30ZkAQD3/oku8EAnqTgE04gWVqWGU9BtTo6GwsfblxAch1UW2AD9Ho/Haw9ywL1j -jdj4Gv74JSJt/pVepbKf4E7tqEpHKQM= -=GIRO +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWpsQAKCRDENHgc6HHz +3ycZAP9PhS3UrRv1wzrQnElUg6P1ysql6hRug69zg9pw8JVrlAEA7kdG/PWz/cli +xgCiWITp/g0Z0wFqJG5/c4cdcDKjxAs= +=vibL -----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-signed b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-signed new file mode 100644 index 00000000..44138690 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-signed @@ -0,0 +1,45 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + c59b78b30b9c8a143bab393433634670df2da633 1062 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 3ec1a101d4cff4e81d05afcf7a7eefe23e6eb1bd 4626 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 02b78e4ca364c71c990ad77b1648feba0360845643a7ca115695fb1337756356 1062 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 24a6cecc76acf84e71f715fa555dc34a8c83ff3f616edaea192ab8c7eca5bb48 4626 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + e2d4e2ad265f5f51b6fc510f93fb4057 1062 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 1f3c5eee601718afb1407994c4fcbe4b 4626 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWoQQAKCRDENHgc6HHz +3z4SAQDiaUs+ViKvG5FNfVdR2OJzZwTavvcMh6GY+AwrElVYFwEA6vbLavgTVumt +EqxVdV1CaUzVnWQILsY93OUVXnwmrgY= +=9rcy +-----END PGP SIGNATURE----- -- GitLab From f7c174f562aa3269fcdd167dd2711f22c61385ee Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 23:44:59 +0100 Subject: [PATCH 11/17] Fix importer test hello --- debexpo/tests/importer/__init__.py | 33 +++++++++++++++++++++---- debexpo/tests/importer/test_importer.py | 8 +++--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index 11dde3f7..3cc61561 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -36,10 +36,9 @@ import pylons from email import message_from_file from glob import glob -from os import remove +from os import remove, makedirs from os.path import isdir, isfile, join, dirname from shutil import rmtree, copytree -from subprocess import Popen, PIPE from bin.debexpo_importer import Importer from debexpo.model import meta @@ -63,12 +62,13 @@ class TestImporterController(TestController): self._setup_models() self._setup_example_user(gpg=True) self._cleanup_mailbox() - self._cleanup_repo() + self._create_repo() def tearDown(self): self._remove_example_user() self._cleanup_mailbox() self._cleanup_repo() + self._cleanup_package() def _cleanup_mailbox(self): """Delete mailbox file""" @@ -76,6 +76,12 @@ class TestImporterController(TestController): if isfile(pylons.config['debexpo.testsmtp']): remove(pylons.config['debexpo.testsmtp']) + def _create_repo(self): + """Delete all files present in repo directory""" + if 'debexpo.repository' in pylons.config: + if not isdir(pylons.config['debexpo.repository']): + makedirs(pylons.config['debexpo.repository']) + def _cleanup_repo(self): """Delete all files present in repo directory""" if 'debexpo.repository' in pylons.config: @@ -101,6 +107,22 @@ class TestImporterController(TestController): email = message_from_file(mbox) return email + def _cleanup_package(self): + packages = meta.session.query(Package).all() + + for package in packages: + versions = \ + meta.session.query(PackageVersion).all() + + for version in versions: + print('deleting {}'.format(version)) + meta.session.delete(version) + + print('deleting {}'.format(package)) + meta.session.delete(package) + + meta.session.commit() + def import_package(self, package_dir): """Run debexpo importer on package_dir/*.changes""" # Copy uplod files to incomming queue @@ -146,6 +168,7 @@ class TestImporterController(TestController): # Get the email and assert that the body contains search_text email = self._get_email() + print('\n{}\n{}\n'.format(search_text, email.get_payload(decode=True))) self.assertTrue(search_text in email.get_payload(decode=True)) def assert_package_count(self, package_name, version, count): @@ -156,11 +179,11 @@ class TestImporterController(TestController): in debexpo repository. """ package = meta.session.query(Package).filter(Package.name == - package_name).all() + package_name).first() if package: count_in_db = \ meta.session.query(PackageVersion).filter(PackageVersion.package_id - == version and PackageVersion.version == version).count() + == package.id and PackageVersion.version == version).count() else: count_in_db = 0 self.assertTrue(count_in_db == count) diff --git a/debexpo/tests/importer/test_importer.py b/debexpo/tests/importer/test_importer.py index c63fd847..b72352f5 100644 --- a/debexpo/tests/importer/test_importer.py +++ b/debexpo/tests/importer/test_importer.py @@ -36,6 +36,7 @@ __author__ = 'Baptiste BEAUPLAT' __copyright__ = 'Copyright © 2018 Baptiste BEAUPLAT' __license__ = 'MIT' +from pylons.test import pylonsapp from debexpo.tests.importer import TestImporterController class TestImporter(TestImporterController): @@ -125,11 +126,12 @@ class TestImporter(TestImporterController): self.import_package('hello') self.assert_importer_succeeded() self.assert_email_with("Your upload of the package 'hello' to " - "mentors.debian.net was successful.") + + pylonsapp.config['debexpo.sitename'] + " was\nsuccessful.") self.assert_package_count('hello', '1.0-1', 1) + self._cleanup_mailbox() self.import_package('hello') self.assert_importer_succeeded() - self.assert_email_with("Your upload of the package 'hello' to" - " mentors.debian.net was successful.") + self.assert_email_with("Your upload of the package 'hello' to " + + pylonsapp.config['debexpo.sitename'] + " was\nsuccessful.") self.assert_package_count('hello', '1.0-1', 2) -- GitLab From 171249d973f0299e9ddcef534d91d97dd49d580b Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Mon, 3 Dec 2018 23:52:38 +0100 Subject: [PATCH 12/17] Add importer test invalid-dist --- .../invalid-dist/hello_1.0-1.debian.tar.xz | 1 + .../data/invalid-dist/hello_1.0-1.dsc | 31 ++++ .../invalid-dist/hello_1.0-1_amd64.buildinfo | 170 ++++++++++++++++++ .../invalid-dist/hello_1.0-1_amd64.changes | 45 +++++ .../data/invalid-dist/hello_1.0-1_amd64.deb | 1 + .../data/invalid-dist/hello_1.0.orig.tar.xz | 1 + .../data/sources/hello_1.0-1.dsc-invlid-dist | 20 +++ .../hello_1.0-1_amd64.buildinfo-invalid-dist | 159 ++++++++++++++++ .../hello_1.0-1_amd64.changes-invalid-dist | 34 ++++ 9 files changed, 462 insertions(+) create mode 120000 debexpo/tests/importer/data/invalid-dist/hello_1.0-1.debian.tar.xz create mode 100644 debexpo/tests/importer/data/invalid-dist/hello_1.0-1.dsc create mode 100644 debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.buildinfo create mode 100644 debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/invalid-dist/hello_1.0.orig.tar.xz create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc-invlid-dist create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-invalid-dist create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-invalid-dist diff --git a/debexpo/tests/importer/data/invalid-dist/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/invalid-dist/hello_1.0-1.dsc b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1.dsc new file mode 100644 index 00000000..ddb3b76f --- /dev/null +++ b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1.dsc @@ -0,0 +1,31 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 168 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWzeAAKCRDENHgc6HHz +32kQAP9qGvxgoXJKKqpMv2pUNe6YGmWGi8JRyNtlOfIluqN+HwEA9bSWg/GvH189 +bGysuZrETyP9fUdlkjIdwkfUOS3+aQo= +=pvUk +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.buildinfo new file mode 100644 index 00000000..e64a1b08 --- /dev/null +++ b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.buildinfo @@ -0,0 +1,170 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + 1183e806d63667511caef3291959bc8a 1062 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + 14e5a184c9c79102e652eeb541c9288b77d97af5 1062 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + f7ef8c9203b213fb244f81f85e4f37fdccb82f66b9dc78213cc123c51fac9825 1062 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWzeAAKCRDENHgc6HHz +35+YAQDqX1lFxtAQqyOr04dE8bnMIMnFFVdD0nQTdwAQA51UuAEAhT9+1KusymCw +4u31IBz0AZG0zTh4yWQaU9oBbNhkGAQ= +=LkYY +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.changes new file mode 100644 index 00000000..48ff1a25 --- /dev/null +++ b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.changes @@ -0,0 +1,45 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: windows +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 14e5a184c9c79102e652eeb541c9288b77d97af5 1062 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 8779889fed1976a256463b5aafa1b6bbae7b8ca2 4626 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + f7ef8c9203b213fb244f81f85e4f37fdccb82f66b9dc78213cc123c51fac9825 1062 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + c9501021bec0a3ba7474622c1da01b451f606a9b429dda0af9d7a49239bec41b 4626 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + 1183e806d63667511caef3291959bc8a 1062 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 87dd2e148dac93e5f7b584578539b45c 4626 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAWzeAAKCRDENHgc6HHz +36p1AQDmmSxuBNCTGya/BGZAVj6wmSpeLsXhL4JSsADKAUHwXQEAj6f+YERZw0hq +6Ahbn2xR/8qLV9D1idhRFskIcQDd+gI= +=P/7+ +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/invalid-dist/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/invalid-dist/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/invalid-dist/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/invalid-dist/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-invlid-dist b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-invlid-dist new file mode 100644 index 00000000..32ab42a1 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-invlid-dist @@ -0,0 +1,20 @@ +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 168 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-invalid-dist b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-invalid-dist new file mode 100644 index 00000000..4d2229d9 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-invalid-dist @@ -0,0 +1,159 @@ +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + a77f08151b482ddd66141744fe1e2312 784 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-invalid-dist b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-invalid-dist new file mode 100644 index 00000000..c684b2c6 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-invalid-dist @@ -0,0 +1,34 @@ +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 12b9785a45d1400abc684af9964fed348b2fcf9d 784 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 643e7c3bd8a51ec64d186adca2a21ee148105044 4345 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 07d9ec16bf2d90983f3ad9b11ce2f9f8adf05a7a62b52b31987dad142c09704e 784 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 80a9b97283b71496d4a7beae1506537ac427e1ebb31ec4a4ab4699d1b42b8f98 4345 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + a77f08151b482ddd66141744fe1e2312 784 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 7c45a75ae2228ca27675a98457552edc 4345 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb -- GitLab From 79e0d5baa19c5d191ef53368ae5dc19af8b0c12c Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Tue, 4 Dec 2018 18:34:19 +0100 Subject: [PATCH 13/17] Add importer test data for wrong-gpg-uid and debian-orig-too-big --- .../hello_1.0-1.debian.tar.xz | 1 + .../data/debian-orig-too-big/hello_1.0-1.dsc | 1 + .../hello_1.0-1_amd64.buildinfo | 1 + .../hello_1.0-1_amd64.changes | 1 + .../debian-orig-too-big/hello_1.0-1_amd64.deb | 1 + .../data/sources/hello_1.0-1.dsc-too-big | 31 ++++ .../data/sources/hello_1.0-1.dsc-wrong-uid | 31 ++++ .../hello_1.0-1_amd64.buildinfo-too-big | 170 ++++++++++++++++++ .../hello_1.0-1_amd64.buildinfo-wrong-uid | 170 ++++++++++++++++++ .../sources/hello_1.0-1_amd64.changes-too-big | 42 +++++ .../hello_1.0-1_amd64.changes-wrong-uid | 45 +++++ .../wrong-gpg-uid/hello_1.0-1.debian.tar.xz | 1 + .../data/wrong-gpg-uid/hello_1.0-1.dsc | 1 + .../wrong-gpg-uid/hello_1.0-1_amd64.buildinfo | 1 + .../wrong-gpg-uid/hello_1.0-1_amd64.changes | 1 + .../data/wrong-gpg-uid/hello_1.0-1_amd64.deb | 1 + .../data/wrong-gpg-uid/hello_1.0.orig.tar.xz | 1 + 17 files changed, 500 insertions(+) create mode 120000 debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.deb create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc-too-big create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1.dsc-wrong-uid create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-too-big create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-wrong-uid create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-too-big create mode 100644 debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-uid create mode 120000 debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.debian.tar.xz create mode 120000 debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.dsc create mode 120000 debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.buildinfo create mode 120000 debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.changes create mode 120000 debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.deb create mode 120000 debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0.orig.tar.xz diff --git a/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.dsc b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.dsc new file mode 120000 index 00000000..b06588fe --- /dev/null +++ b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc-too-big \ No newline at end of file diff --git a/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..9c836811 --- /dev/null +++ b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo-too-big \ No newline at end of file diff --git a/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..29f211c4 --- /dev/null +++ b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-too-big \ No newline at end of file diff --git a/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/debian-orig-too-big/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-too-big b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-too-big new file mode 100644 index 00000000..6ec8a872 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-too-big @@ -0,0 +1,31 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 999999999 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 999999999 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 999999999 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAaxiQAKCRDENHgc6HHz +3+T+AP4tvETYGAZ3LkpsQEIpFKXHI+PZwLF6TcsZk+gDNvXvtwD9EM2d2YnXrVlg +qwtYxWJnQAMXXysJVdsg1mGn4t0TDg4= +=dnHI +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-wrong-uid b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-wrong-uid new file mode 100644 index 00000000..71f521b6 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1.dsc-wrong-uid @@ -0,0 +1,31 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 3.0 (quilt) +Source: hello +Binary: hello +Architecture: any +Version: 1.0-1 +Maintainer: Baptiste BEAUPLAT +Homepage: +Standards-Version: 4.1.3 +Build-Depends: debhelper (>= 11) +Package-List: + hello deb unknown optional arch=any +Checksums-Sha1: + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz +Checksums-Sha256: + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz +Files: + 3789bf498b8c4cf0387383466ec4c227 168 hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 hello_1.0-1.debian.tar.xz + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQSGVz4uSUdVmCPsPxTH4ZqYGuqOuwUCXAa5KgAKCRDH4ZqYGuqO +u9ujAQC3v2jMVVfv5WNBijn4H5PYQ0JQ1NtrgDLDwkPJMixwWgD+JFsJYVgwOqsS +bV7iFcSu7NePUOrwPYyDDMjkmLwRtws= +=CQUY +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-too-big b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-too-big new file mode 100644 index 00000000..f6497551 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-too-big @@ -0,0 +1,170 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + 4197eafc9979cbe93d00e0c4cbdbbe09 1080 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + 01e96e11cf0077f0e47e44e6bd80dfac223fe0c3 1080 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 30951ebde0060ae12613804b1f4639a3e4c1c0570f981acd24d15a1b02be8a4e 1080 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAaxiQAKCRDENHgc6HHz +37tOAP0d2yJr4cD5sPqnFPeuw0wqefoEtezAhis1xsS81kKR1wEAgpqm80Z/vhpf +RO5OCaJqmEijdVM8fke9owD/6q9GFAY= +=5HuC +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-wrong-uid b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-wrong-uid new file mode 100644 index 00000000..e1bec9fc --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.buildinfo-wrong-uid @@ -0,0 +1,170 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.0 +Source: hello +Binary: hello +Architecture: amd64 source +Version: 1.0-1 +Checksums-Md5: + c6ec78c569ba897fd5cfeb7b108e1abe 1062 hello_1.0-1.dsc + 4c3f75043d99b8a9d3d5019b46a3625c 2316 hello_1.0-1_amd64.deb +Checksums-Sha1: + ad81ad70eb8d0e72626ac853793ec310da96d64d 1062 hello_1.0-1.dsc + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 5dd1b897bb1338874f64c6429e133757582754486caaf14aeb7cb345131bda74 1062 hello_1.0-1.dsc + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Build-Origin: Debian +Build-Architecture: amd64 +Build-Date: Sun, 02 Dec 2018 21:39:25 +0000 +Build-Path: /build/hello-mcxzr0/hello-1.0 +Installed-Build-Depends: + autoconf (= 2.69-11), + automake (= 1:1.16.1-4), + autopoint (= 0.19.8.1-9), + autotools-dev (= 20180224.1), + base-files (= 10.1), + base-passwd (= 3.5.45), + bash (= 4.4.18-3.1), + binutils (= 2.31.1-10), + binutils-common (= 2.31.1-10), + binutils-x86-64-linux-gnu (= 2.31.1-10), + bsdmainutils (= 11.1.2+b1), + bsdutils (= 1:2.32.1-0.2), + build-essential (= 12.5), + bzip2 (= 1.0.6-9), + coreutils (= 8.30-1), + cpp (= 4:8.2.0-2), + cpp-8 (= 8.2.0-10), + dash (= 0.5.10.2-1), + debconf (= 1.5.69), + debhelper (= 11.5.3), + debianutils (= 4.8.6), + dh-autoreconf (= 19), + dh-strip-nondeterminism (= 0.45.0-1), + diffutils (= 1:3.6-1), + dpkg (= 1.19.2), + dpkg-dev (= 1.19.2), + dwz (= 0.12-2), + fdisk (= 2.32.1-0.2), + file (= 1:5.34-2), + findutils (= 4.6.0+git+20181018-1), + g++ (= 4:8.2.0-2), + g++-8 (= 8.2.0-10), + gcc (= 4:8.2.0-2), + gcc-8 (= 8.2.0-10), + gcc-8-base (= 8.2.0-10), + gettext (= 0.19.8.1-9), + gettext-base (= 0.19.8.1-9), + grep (= 3.1-2), + groff-base (= 1.22.3-10), + gzip (= 1.9-2.1), + hostname (= 3.21), + init-system-helpers (= 1.56), + intltool-debian (= 0.35.0+20060710.4), + libacl1 (= 2.2.52-3+b1), + libarchive-zip-perl (= 1.64-1), + libasan5 (= 8.2.0-10), + libatomic1 (= 8.2.0-10), + libattr1 (= 1:2.4.47-2+b2), + libaudit-common (= 1:2.8.4-2), + libaudit1 (= 1:2.8.4-2), + libbinutils (= 2.31.1-10), + libblkid1 (= 2.32.1-0.2), + libbsd0 (= 0.9.1-1), + libbz2-1.0 (= 1.0.6-9), + libc-bin (= 2.28-1), + libc-dev-bin (= 2.28-1), + libc6 (= 2.28-1), + libc6-dev (= 2.28-1), + libcap-ng0 (= 0.7.9-1+b1), + libcc1-0 (= 8.2.0-10), + libcroco3 (= 0.6.12-2), + libdb5.3 (= 5.3.28+dfsg1-0.2), + libdebconfclient0 (= 0.245), + libdpkg-perl (= 1.19.2), + libelf1 (= 0.175-1), + libfdisk1 (= 2.32.1-0.2), + libffi6 (= 3.2.1-9), + libfile-stripnondeterminism-perl (= 0.45.0-1), + libgcc-8-dev (= 8.2.0-10), + libgcc1 (= 1:8.2.0-10), + libgcrypt20 (= 1.8.4-4), + libgdbm-compat4 (= 1.18.1-2), + libgdbm6 (= 1.18.1-2), + libglib2.0-0 (= 2.58.1-2), + libgmp10 (= 2:6.1.2+dfsg-4), + libgomp1 (= 8.2.0-10), + libgpg-error0 (= 1.32-3), + libicu63 (= 63.1-5), + libisl19 (= 0.20-2), + libitm1 (= 8.2.0-10), + liblsan0 (= 8.2.0-10), + liblz4-1 (= 1.8.2-1), + liblzma5 (= 5.2.2-1.3), + libmagic-mgc (= 1:5.34-2), + libmagic1 (= 1:5.34-2), + libmount1 (= 2.32.1-0.2), + libmpc3 (= 1.1.0-1), + libmpfr6 (= 4.0.1-1), + libmpx2 (= 8.2.0-10), + libncurses6 (= 6.1+20181013-1), + libncursesw6 (= 6.1+20181013-1), + libpam-modules (= 1.1.8-3.8), + libpam-modules-bin (= 1.1.8-3.8), + libpam-runtime (= 1.1.8-3.8), + libpam0g (= 1.1.8-3.8), + libpcre3 (= 2:8.39-11), + libperl5.28 (= 5.28.1-1), + libpipeline1 (= 1.5.0-2), + libquadmath0 (= 8.2.0-10), + libseccomp2 (= 2.3.3-3), + libselinux1 (= 2.8-1+b1), + libsigsegv2 (= 2.12-2), + libsmartcols1 (= 2.32.1-0.2), + libstdc++-8-dev (= 8.2.0-10), + libstdc++6 (= 8.2.0-10), + libsystemd0 (= 239-14), + libtinfo6 (= 6.1+20181013-1), + libtool (= 2.4.6-6), + libtsan0 (= 8.2.0-10), + libubsan1 (= 8.2.0-10), + libudev1 (= 239-14), + libunistring2 (= 0.9.10-1), + libuuid1 (= 2.32.1-0.2), + libxml2 (= 2.9.4+dfsg1-7+b2), + linux-libc-dev (= 4.18.20-2), + login (= 1:4.5-1.1), + m4 (= 1.4.18-2), + make (= 4.2.1-1.2), + man-db (= 2.8.4-3), + mawk (= 1.3.3-17+b3), + ncurses-base (= 6.1+20181013-1), + ncurses-bin (= 6.1+20181013-1), + patch (= 2.7.6-3), + perl (= 5.28.1-1), + perl-base (= 5.28.1-1), + perl-modules-5.28 (= 5.28.1-1), + po-debconf (= 1.0.21), + sed (= 4.5-2), + sensible-utils (= 0.0.12), + sysvinit-utils (= 2.92~beta-2), + tar (= 1.30+dfsg-3), + util-linux (= 2.32.1-0.2), + xz-utils (= 5.2.2-1.3), + zlib1g (= 1:1.2.11.dfsg-1) +Environment: + DEB_BUILD_OPTIONS="parallel=5" + LANG="en_US.UTF-8" + LC_ALL="POSIX" + LD_LIBRARY_PATH="/usr/lib/libeatmydata" + SOURCE_DATE_EPOCH="1543786691" + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQSGVz4uSUdVmCPsPxTH4ZqYGuqOuwUCXAa5KgAKCRDH4ZqYGuqO +uzOPAQDDqFMb+H7jEtNEQ21AaGBi1b0rsGKVu7/kKDZ+8Xt9RwD/eOWige76+bX3 +537LSx+fx41ftTt5zWdBxbAE7k1xFw0= +=/moU +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-too-big b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-too-big new file mode 100644 index 00000000..c38f55c8 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-too-big @@ -0,0 +1,42 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + 01e96e11cf0077f0e47e44e6bd80dfac223fe0c3 1080 hello_1.0-1.dsc + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + d14e5ea8ff023785eb4b8ce0fb1c0d0bd7af92ec 4626 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 30951ebde0060ae12613804b1f4639a3e4c1c0570f981acd24d15a1b02be8a4e 1080 hello_1.0-1.dsc + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 3cad8cb0bf309032fc7cca76f500b148f3fb1f0fd2a7ab329081138dd115de08 4626 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + 4197eafc9979cbe93d00e0c4cbdbbe09 1080 unknown optional hello_1.0-1.dsc + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + 5da161356f255eba1ce32641deeae691 4626 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQRVkwbu4cjBst0cc7HENHgc6HHz3wUCXAaxiQAKCRDENHgc6HHz +32dyAPsHaUXZ+bi5KzhnHzNmAqvtjPWGi0fy4a9RwgwG1M3Q4wEA6FERmWOEeYGk +2sqrGYus2iNn9kXANAbtYBD6cQN1ywI= +=MUhv +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-uid b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-uid new file mode 100644 index 00000000..f7e8e9a3 --- /dev/null +++ b/debexpo/tests/importer/data/sources/hello_1.0-1_amd64.changes-wrong-uid @@ -0,0 +1,45 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +Format: 1.8 +Date: Sun, 02 Dec 2018 22:38:11 +0100 +Source: hello +Binary: hello +Architecture: source amd64 +Version: 1.0-1 +Distribution: unstable +Urgency: medium +Maintainer: Baptiste BEAUPLAT +Changed-By: Baptiste BEAUPLAT +Description: + hello - +Changes: + hello (1.0-1) unstable; urgency=medium + . + * Initial release (Closes: #nnnn) +Checksums-Sha1: + ad81ad70eb8d0e72626ac853793ec310da96d64d 1062 hello_1.0-1.dsc + be505a70074ab85fed3f68026242651fcde85bf2 168 hello_1.0.orig.tar.xz + 1b0605ef708d31b2396ce3f80bd5e52c8a03af59 7808 hello_1.0-1.debian.tar.xz + 62c92ae2a20388d9d79a24200787aa0ee5ed84b0 4626 hello_1.0-1_amd64.buildinfo + 4704c98642a0cb7dfd6b9a4cb4c0d61916a1e729 2316 hello_1.0-1_amd64.deb +Checksums-Sha256: + 5dd1b897bb1338874f64c6429e133757582754486caaf14aeb7cb345131bda74 1062 hello_1.0-1.dsc + 622d2165e0ae0aee8b3dac5fbf07f471db2205c4cb60d1c3ce3762a12fbe62bf 168 hello_1.0.orig.tar.xz + 9454f8244e73ab8932833d0e2b4a3e2526407ffd22b687082d1c27876f771555 7808 hello_1.0-1.debian.tar.xz + 63a9a6a2a70d9367e8633b8fbb18e3153e5f1a90885fd9d5fc557b24e9a5afc4 4626 hello_1.0-1_amd64.buildinfo + c98b2da09c2abe6b446c36aa3210adacde8d3566f8e76ea62c15b9aa7bbfd1f5 2316 hello_1.0-1_amd64.deb +Files: + c6ec78c569ba897fd5cfeb7b108e1abe 1062 unknown optional hello_1.0-1.dsc + 3789bf498b8c4cf0387383466ec4c227 168 unknown optional hello_1.0.orig.tar.xz + 8b4cae66eaf956a2b39b7d3d5482580a 7808 unknown optional hello_1.0-1.debian.tar.xz + c2c0c94923eeca97a69fc4ee4654e3b5 4626 unknown optional hello_1.0-1_amd64.buildinfo + 4c3f75043d99b8a9d3d5019b46a3625c 2316 unknown optional hello_1.0-1_amd64.deb + +-----BEGIN PGP SIGNATURE----- + +iHUEARYIAB0WIQSGVz4uSUdVmCPsPxTH4ZqYGuqOuwUCXAa5KgAKCRDH4ZqYGuqO +ux9CAPwJCqTZw/nV9zU+zaDzBe+w1ZSvF/LzjJ331mSDro1l1AD8DaFmGY9FlaM4 +y4x7kj2y+RJUeYySAKl2+P76Lgdv0wA= +=SOra +-----END PGP SIGNATURE----- diff --git a/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.debian.tar.xz b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.debian.tar.xz new file mode 120000 index 00000000..5ffba618 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.debian.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0-1.debian.tar.xz \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.dsc b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.dsc new file mode 120000 index 00000000..b1279ed0 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1.dsc @@ -0,0 +1 @@ +../sources/hello_1.0-1.dsc-wrong-uid \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.buildinfo b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.buildinfo new file mode 120000 index 00000000..6f797c5a --- /dev/null +++ b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.buildinfo @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.buildinfo-wrong-uid \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.changes b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.changes new file mode 120000 index 00000000..a06d7414 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.changes @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.changes-wrong-uid \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.deb b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.deb new file mode 120000 index 00000000..afe90bc0 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0-1_amd64.deb @@ -0,0 +1 @@ +../sources/hello_1.0-1_amd64.deb \ No newline at end of file diff --git a/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0.orig.tar.xz b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0.orig.tar.xz new file mode 120000 index 00000000..e870f457 --- /dev/null +++ b/debexpo/tests/importer/data/wrong-gpg-uid/hello_1.0.orig.tar.xz @@ -0,0 +1 @@ +../sources/hello_1.0.orig.tar.xz \ No newline at end of file -- GitLab From dd76999cf6488226e765bd6ad1e433bdd993ab4d Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Tue, 4 Dec 2018 18:35:01 +0100 Subject: [PATCH 14/17] Allow TestImporterController to add any key to keyring --- debexpo/tests/__init__.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/debexpo/tests/__init__.py b/debexpo/tests/__init__.py index 9ac441b2..4676a6d5 100644 --- a/debexpo/tests/__init__.py +++ b/debexpo/tests/__init__.py @@ -131,23 +131,22 @@ xOwJ1heEnfmgPkuiz7jFCAo= meta.session.query(UserCountry).delete() meta.session.commit() - def _add_gpg_key(self, user): + def _add_gpg_key(self, key, key_id=None, user=None): gpg_ctl = GnuPG() - # Update gpg info in user object - user.gpg = self._GPG_KEY - user.gpg_id = self._GPG_ID - # Add key to keyring temp = tempfile.NamedTemporaryFile(delete=True) - temp.write(user.gpg) + temp.write(key) temp.flush() gpg_ctl.add_signature(temp.name) temp.close() # Update user in database - meta.session.merge(user) - meta.session.commit() + if user: + user.gpg = key + user.gpg_id = key_id + meta.session.merge(user) + meta.session.commit() def _setup_example_user(self, gpg=False): @@ -176,7 +175,7 @@ xOwJ1heEnfmgPkuiz7jFCAo= meta.session.commit() if gpg: - self._add_gpg_key(user) + self._add_gpg_key(self._GPG_KEY, self._GPG_ID, user) def _remove_example_user(self): """Remove the example user. -- GitLab From 067ae4833e2f23825e0de371ab22e98a356b8487 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Tue, 4 Dec 2018 18:35:28 +0100 Subject: [PATCH 15/17] Add new orphan key for wrong-gpg-uid test --- debexpo/tests/importer/__init__.py | 1 - debexpo/tests/importer/test_importer.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index 3cc61561..b7ffd8de 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -168,7 +168,6 @@ class TestImporterController(TestController): # Get the email and assert that the body contains search_text email = self._get_email() - print('\n{}\n{}\n'.format(search_text, email.get_payload(decode=True))) self.assertTrue(search_text in email.get_payload(decode=True)) def assert_package_count(self, package_name, version, count): diff --git a/debexpo/tests/importer/test_importer.py b/debexpo/tests/importer/test_importer.py index b72352f5..ea4bf7bb 100644 --- a/debexpo/tests/importer/test_importer.py +++ b/debexpo/tests/importer/test_importer.py @@ -47,6 +47,26 @@ class TestImporter(TestImporterController): sent to the user or accepting it and making it available in debexpo repo """ + _ORPHAN_GPG_KEY = """ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mDMEW/F8GBYJKwYBBAHaRw8BAQdA6Riq9GZh/HiwtFjPcvz5i5oFzp1I8RiqxBs1 +g06oSh+0HXByaW1hcnkgaWQgPG1haW5AZXhhbXBsZS5vcmc+iJMEExYIADsCGwMF +CwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQSGVz4uSUdVmCPsPxTH4ZqYGuqOuwUC +W/F8dAIZAQAKCRDH4ZqYGuqOu9GTAQCCMRbXuueDLcC4eWmMGGiAmqLzKdhGJxQe +e0k5d6wkKQEA2vdlMg9s3UFL4e8jnJPYeNpsxDaaEPr0jMLnwcBp8wa0JWRlYmV4 +cG8gdGVzdGluZyA8ZGViZXhwb0BleGFtcGxlLm9yZz6IkAQTFggAOBYhBIZXPi5J +R1WYI+w/FMfhmpga6o67BQJb8XxSAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheA +AAoJEMfhmpga6o67MjUBAMYVSthPo3oKR1PpV9ebHFiSARmc2BxxL+xmdzfiRT3O +AP9JQZxCSl3awI5xos8mw2edsDWYcaS2y+RmbTLv8wR2Abg4BFvxfBgSCisGAQQB +l1UBBQEBB0Doc/H7Tyvf+6kdlnUOqY+0t3pkKYj0EOK6QFKMnlRpJwMBCAeIeAQY +FggAIBYhBIZXPi5JR1WYI+w/FMfhmpga6o67BQJb8XwYAhsMAAoJEMfhmpga6o67 +Vh8A/AxTKLqACJnSVFrO2sArc7Yt3tymB+of9JeBF6iYBbuDAP9r32J6TYFB9OSz +r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== +=BMLr +-----END PGP PUBLIC KEY BLOCK----- +""" + def __init__(self, *args, **kwargs): TestImporterController.__init__(self, *args, **kwargs) @@ -95,6 +115,7 @@ class TestImporter(TestImporterController): self.assert_package_count('hello', '1.0-1', 0) def test_import_package_wrong_gpg_uid(self): + self._add_gpg_key(self._ORPHAN_GPG_KEY) self.import_package('wrong-gpg-uid') self.assert_importer_failed() self.assert_email_with('Your GPG key does not match the email used to' -- GitLab From 00187e086f175e96bfce2a561dab0178d78269d6 Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Tue, 4 Dec 2018 22:26:08 +0100 Subject: [PATCH 16/17] Add tests for repo files in the importer --- debexpo/tests/importer/__init__.py | 33 +++++++++++++++++++------ debexpo/tests/importer/test_importer.py | 13 ++++++++++ 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/debexpo/tests/importer/__init__.py b/debexpo/tests/importer/__init__.py index b7ffd8de..0fbba5e7 100644 --- a/debexpo/tests/importer/__init__.py +++ b/debexpo/tests/importer/__init__.py @@ -36,7 +36,7 @@ import pylons from email import message_from_file from glob import glob -from os import remove, makedirs +from os import remove, makedirs, walk from os.path import isdir, isfile, join, dirname from shutil import rmtree, copytree @@ -63,6 +63,7 @@ class TestImporterController(TestController): self._setup_example_user(gpg=True) self._cleanup_mailbox() self._create_repo() + self.upload_dir = pylons.config['debexpo.upload.incoming'] def tearDown(self): self._remove_example_user() @@ -91,7 +92,6 @@ class TestImporterController(TestController): def _upload_package(self, package_dir): """Copy a directory content to incoming queue""" self.assertTrue('debexpo.upload.incoming' in pylons.config) - self.upload_dir = pylons.config['debexpo.upload.incoming'] # copytree dst dir must not exist if isdir(self.upload_dir): @@ -123,6 +123,20 @@ class TestImporterController(TestController): meta.session.commit() + def _package_in_repo(self, package_name, version): + """Check if package is present in repo""" + matches = self._find_all(package_name + '_' + version + '.dsc', + pylons.config['debexpo.repository']) + return len(matches) + + def _find_all(self, name, path): + """Find a file in a path""" + result = [] + for root, dirs, files in walk(path): + if name in files: + result.append(join(root, name)) + return result + def import_package(self, package_dir): """Run debexpo importer on package_dir/*.changes""" # Copy uplod files to incomming queue @@ -171,12 +185,7 @@ class TestImporterController(TestController): self.assertTrue(search_text in email.get_payload(decode=True)) def assert_package_count(self, package_name, version, count): - """ - Assert that a package appears count times in debexpo - - If count > 0, this method with also assert that the package is present - in debexpo repository. - """ + """Assert that a package appears count times in debexpo""" package = meta.session.query(Package).filter(Package.name == package_name).first() if package: @@ -186,3 +195,11 @@ class TestImporterController(TestController): else: count_in_db = 0 self.assertTrue(count_in_db == count) + + def assert_package_in_repo(self, package_name, version): + """Assert that a package is present in debexpo repo""" + self.assertTrue(self._package_in_repo(package_name, version) > 0) + + def assert_package_not_in_repo(self, package_name, version): + """Assert that a package is present in debexpo repo""" + self.assertTrue(self._package_in_repo(package_name, version) == 0) diff --git a/debexpo/tests/importer/test_importer.py b/debexpo/tests/importer/test_importer.py index ea4bf7bb..f1d5baa9 100644 --- a/debexpo/tests/importer/test_importer.py +++ b/debexpo/tests/importer/test_importer.py @@ -75,24 +75,28 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_importer_failed() self.assert_no_email() self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_corrupted_changes(self): self.import_package('corrupted-changes') self.assert_importer_failed() self.assert_no_email() self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_missing_file_in_changes(self): self.import_package('missing-file-in-changes') self.assert_importer_failed() self.assert_no_email() self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_wrong_checksum_in_changes(self): self.import_package('wrong-checksum-in-changes') self.assert_importer_failed() self.assert_no_email() self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_no_dsc(self): self.import_package('no-dsc') @@ -100,12 +104,14 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with('Rejecting incomplete upload.\nYou did not' ' upload the dsc file\n') self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_not_signed(self): self.import_package('not-signed') self.assert_importer_failed() self.assert_email_with('Your upload does not appear to be signed') self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_unknown_key(self): self.import_package('unknown-key') @@ -113,6 +119,7 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with('Your upload does not contain a valid' ' signature.') self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_wrong_gpg_uid(self): self._add_gpg_key(self._ORPHAN_GPG_KEY) @@ -121,6 +128,7 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with('Your GPG key does not match the email used to' ' register') self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_invalid_dist(self): self.import_package('invalid-dist') @@ -128,6 +136,7 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with('You are not uploading to one of those Debian' ' distribution') self.assert_package_count('hello', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_no_orig(self): self.import_package('no-orig') @@ -135,6 +144,7 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with('Rejecting incomplete upload. You did not' ' upload any original tarball (orig.tar.gz)') self.assert_package_count('non-existent', '1.0-1', 0) + self.assert_package_not_in_repo('hello', '1.0-1') def test_import_package_debian_orig_too_big(self): self.import_package('debian-orig-too-big') @@ -142,6 +152,7 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with('We did find it on Debian main archive, however' ' it is too big to be downloaded by our system') self.assert_package_count('0ad-data', '0.0.23-1', 0) + self.assert_package_not_in_repo('0ad-data', '0.0.23-1') def test_import_package_hello(self): self.import_package('hello') @@ -149,6 +160,7 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with("Your upload of the package 'hello' to " + pylonsapp.config['debexpo.sitename'] + " was\nsuccessful.") self.assert_package_count('hello', '1.0-1', 1) + self.assert_package_in_repo('hello', '1.0-1') self._cleanup_mailbox() self.import_package('hello') @@ -156,3 +168,4 @@ r1JREXlgQRuRdd5ZWSvIxKaKGVbYCw== self.assert_email_with("Your upload of the package 'hello' to " + pylonsapp.config['debexpo.sitename'] + " was\nsuccessful.") self.assert_package_count('hello', '1.0-1', 2) + self.assert_package_in_repo('hello', '1.0-1') -- GitLab From bc85cdb04c4464e5e3c470dd642830f70fcb03cd Mon Sep 17 00:00:00 2001 From: Baptiste BEAUPLAT Date: Tue, 4 Dec 2018 22:31:58 +0100 Subject: [PATCH 17/17] Add missing dependencies for ci and importer tests --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c4db6bb..e505004a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ before_script: - apt-get -q update - env DEBIAN_FRONTEND=noninteractive apt-get -q -y install --no-install-recommends aspcud apt-cudf - env DEBIAN_FRONTEND=noninteractive apt-get -q -y --solver aspcud -o APT::Solver::Strict-Pinning=0 -o Debug::pkgProblemResolver=yes install --no-install-recommends - python-sqlalchemy python-pylons python-debian python-babel iso-codes gnupg python-apt python-lxml python-coverage + python-sqlalchemy python-pylons python-debian python-babel iso-codes gnupg python-apt python-lxml python-coverage lintian ca-certificates .test_template: &test script: -- GitLab