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 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 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)