def test_yesmore(self): dynamo_consistency.opts.MORELOGS = True site = picker.pick_site() main.main(site) unmerged = history.unmerged_files(site) self.assertTrue('/store/logs/prod/recent/test.tar.gz' in unmerged) self.assertFalse('/store/logs/prod/nope/test.tar.gz' in unmerged)
def test_unmerged(self): history.start_run() history.report_unmerged(self.missing) history.finish_run() self.assertEqual(history.unmerged_files(history.config.SITE), sorted([miss[0] for miss in self.missing])) self.assertFalse(history.missing_files(history.config.SITE))
def test_othersite(self): dynamo_consistency.opts.MORELOGS = True config.config_dict() config.CONFIG['AdditionalLogDeletions']['TEST_SITE2'] = config.CONFIG['AdditionalLogDeletions'].pop('TEST_SITE') site = picker.pick_site() main.main(site) self.assertTrue(history.orphan_files(site)) unmerged = history.unmerged_files(site) self.assertFalse('/store/logs/prod/recent/test.tar.gz' in unmerged) self.assertFalse('/store/logs/prod/nope/test.tar.gz' in unmerged)
def test_crash(self): site = picker.pick_site() summary.running(site) main.main(site) summary.unlock_site(site) self.assertFalse(history.unmerged_files(site)) # Test for completed run report conn = summary.LockedConn() results = conn.execute('SELECT * FROM stats;') self.assertTrue(list(results))
def test_nomore(self): site = picker.pick_site() main.main(site) unmerged = history.unmerged_files(site) self.assertFalse('/store/logs/prod/recent/test.tar.gz' in unmerged) self.assertFalse('/store/logs/prod/nope/test.tar.gz' in unmerged)