def stayClearOfLiveSuites(self): # in both lenny (sticky) and squeeze (live) DUP_PKG = ('libcaca', '0.99.beta17-1') self.assertHasLivePackage(*DUP_PKG) archiver.add_suite(self.conf, self.session, 'lenny', self.archive) self.assertHasStickyPackage(*DUP_PKG) archiver.remove_suite(self.conf, self.session, 'lenny') self.assertHasLivePackage(*DUP_PKG)
def countsReferences(self): DUP_PKG = ("2utf", "1.04") # in both hamm and slink archiver.add_suite(self.conf, self.session, "hamm", self.archive) self.assertHasStickyPackage(*DUP_PKG) archiver.add_suite(self.conf, self.session, "slink", self.archive) self.assertHasStickyPackage(*DUP_PKG) archiver.remove_suite(self.conf, self.session, "hamm") self.assertHasStickyPackage(*DUP_PKG) archiver.remove_suite(self.conf, self.session, "slink") self.assertLacksStickyPackage(*DUP_PKG)
def countsReferences(self): DUP_PKG = ('2utf', '1.04') # in both hamm and slink archiver.add_suite(self.conf, self.session, 'hamm', self.archive) self.assertHasStickyPackage(*DUP_PKG) archiver.add_suite(self.conf, self.session, 'slink', self.archive) self.assertHasStickyPackage(*DUP_PKG) archiver.remove_suite(self.conf, self.session, 'hamm') self.assertHasStickyPackage(*DUP_PKG) archiver.remove_suite(self.conf, self.session, 'slink') self.assertLacksStickyPackage(*DUP_PKG)
def addsStickySuites(self): SUITES = ['hamm', 'slink'] PACKAGES = [('3dchess', '0.8.1-3'), # hamm ('ed', '0.2-16'), # hamm ('WMRack', '1.0b3-1')] # slink, pkg w/ weird naming for suite in SUITES: archiver.add_suite(self.conf, self.session, suite, self.archive) for suite in SUITES: self.assertHasStickySuite(suite) s = db_storage.lookup_db_suite(self.session, suite, sticky=True) rel_info = DEBIAN_RELEASES[suite] self.assertEqual(s.version, rel_info['version']) self.assertEqual(s.release_date, rel_info['date']) for pkg in PACKAGES: self.assertHasStickyPackage(*pkg)
def removesStickySuite(self): SARGE_PACKAGES = [('asm', '1.5.2-1'), ('zziplib', '0.12.83-4')] stats_file = os.path.join(self.conf['cache_dir'], 'stats.data') # to test stats.data cleanup self.conf['stages'] = self.TEST_STAGES.union( set([updater.STAGE_STATS])) archiver.add_suite(self.conf, self.session, 'sarge', self.archive) self.assertHasStickySuite('sarge') for pkg in SARGE_PACKAGES: self.assertHasStickyPackage(*pkg) stats = statistics.load_metadata_cache(stats_file) self.assertTrue('debian_sarge.sloccount' in stats) archiver.remove_suite(self.conf, self.session, 'sarge') self.assertLacksStickySuite('sarge') for pkg in SARGE_PACKAGES: self.assertLacksStickyPackage(*pkg) stats = statistics.load_metadata_cache(stats_file) self.assertFalse('debian_sarge.sloccount' in stats)
def addsStickySuites(self): SUITES = ["hamm", "slink"] PACKAGES = [ ("3dchess", "0.8.1-3"), # hamm ("ed", "0.2-16"), # hamm ("WMRack", "1.0b3-1"), ] # slink, pkg w/ weird naming for suite in SUITES: archiver.add_suite(self.conf, self.session, suite, self.archive) for suite in SUITES: self.assertHasStickySuite(suite) s = db_storage.lookup_db_suite(self.session, suite, sticky=True) rel_info = DEBIAN_RELEASES[suite] self.assertEqual(s.version, rel_info["version"]) self.assertEqual(s.release_date, rel_info["date"]) for pkg in PACKAGES: self.assertHasStickyPackage(*pkg)
def removesStickySuite(self): SARGE_PACKAGES = [("asm", "1.5.2-1"), ("zziplib", "0.12.83-4")] stats_file = self.conf["cache_dir"] / "stats.data" # to test stats.data cleanup self.conf["stages"] = self.TEST_STAGES.union(set([updater.STAGE_STATS ])) archiver.add_suite(self.conf, self.session, "sarge", self.archive) self.assertHasStickySuite("sarge") for pkg in SARGE_PACKAGES: self.assertHasStickyPackage(*pkg) stats = statistics.load_metadata_cache(stats_file) self.assertTrue("debian_sarge.sloccount" in stats) archiver.remove_suite(self.conf, self.session, "sarge") self.assertLacksStickySuite("sarge") for pkg in SARGE_PACKAGES: self.assertLacksStickyPackage(*pkg) stats = statistics.load_metadata_cache(stats_file) self.assertFalse("debian_sarge.sloccount" in stats)
def guessAreaForSectionlessPkgs(self): sectionless_pkg = ('tripwire', '1.2-15') archiver.add_suite(self.conf, self.session, 'slink', self.archive) p = db_storage.lookup_package(self.session, *sectionless_pkg) self.assertEqual('non-free', p.area)
def canAddPkgsWSpecialFiles(self): pkg_w_pipe = ('freewrl', '0.20.a1-3') archiver.add_suite(self.conf, self.session, 'potato', self.archive) self.assertHasStickyPackage(*pkg_w_pipe)
def guessAreaForSectionlessPkgs(self): sectionless_pkg = ("tripwire", "1.2-15") archiver.add_suite(self.conf, self.session, "slink", self.archive) p = db_storage.lookup_package(self.session, *sectionless_pkg) self.assertEqual("non-free", p.area)
def canAddPkgsWSpecialFiles(self): pkg_w_pipe = ("freewrl", "0.20.a1-3") archiver.add_suite(self.conf, self.session, "potato", self.archive) self.assertHasStickyPackage(*pkg_w_pipe)