예제 #1
0
    def setUp(self):
        self.db_setup()
        self.tmpdir = tempfile.mkdtemp(suffix='.debsources-test')
        self.conf = mk_conf(self.tmpdir)
        self.conf['stages'] = self.TEST_STAGES
        self.longMessage = True
        self.maxDiff = None

        orig_sources = os.path.join(TEST_DATA_DIR, 'sources')
        dest_sources = self.conf['sources_dir']
        shutil.copytree(orig_sources, dest_sources)

        mainlib.init_logging(self.conf, console_verbosity=logging.WARNING)
        obs, exts = mainlib.load_hooks(self.conf)
        self.conf['observers'], self.conf['file_exts'] = obs, exts

        self.archive = debmirror.SourceMirrorArchive(
            self.conf['mirror_archive_dir'])
예제 #2
0
    def setUp(self):
        self.db_setup()
        self.tmpdir = tempfile.mkdtemp(suffix='.debsources-test')
        self.conf = mk_conf(self.tmpdir)
        self.conf['stages'] = self.TEST_STAGES
        self.longMessage = True
        self.maxDiff = None

        orig_sources = os.path.join(TEST_DATA_DIR, 'sources')
        dest_sources = self.conf['sources_dir']
        shutil.copytree(orig_sources, dest_sources)

        mainlib.init_logging(self.conf, console_verbosity=logging.WARNING)
        obs, exts = mainlib.load_hooks(self.conf)
        self.conf['observers'], self.conf['file_exts'] = obs, exts

        self.archive = debmirror.SourceMirrorArchive(
            self.conf['mirror_archive_dir'])
예제 #3
0
    def setUp(self):
        self.db_setup()
        self.tmpdir = tempfile.mkdtemp(suffix=".debsources-test")
        self.conf = mk_conf(Path(self.tmpdir))
        self.conf["stages"] = self.TEST_STAGES
        self.longMessage = True
        self.maxDiff = None

        orig_sources = TEST_DATA_DIR / "sources"
        dest_sources = self.conf["sources_dir"]
        shutil.copytree(orig_sources, dest_sources)

        mainlib.init_logging(self.conf, console_verbosity=logging.WARNING)
        obs, exts = mainlib.load_hooks(self.conf)
        self.conf["observers"], self.conf["file_exts"] = obs, exts

        self.archive = debmirror.SourceMirrorArchive(
            self.conf["mirror_archive_dir"])
예제 #4
0
 def do_update(self, stages=TEST_STAGES):
     """do a full update run in a virtual test environment"""
     mainlib.init_logging(self.conf, console_verbosity=logging.WARNING)
     obs, exts = mainlib.load_hooks(self.conf)
     self.conf['observers'], self.conf['file_exts'] = obs, exts
     updater.update(self.conf, self.session, stages)