def test_makeTAC_existing_incorrect(self):
     with open(os.path.join("test", "buildbot.tac"), "wt") as f:
         f.write("WRONG")
     create_master.makeTAC(mkconfig(basedir="test"))
     self.assertInTacFile("WRONG")
     self.assertTrue(os.path.exists(os.path.join("test", "buildbot.tac.new")))
     self.assertInStdout("not touching existing buildbot.tac")
Beispiel #2
0
 def test_makeTAC_existing_incorrect(self):
     with open(os.path.join('test', 'buildbot.tac'), 'wt') as f:
         f.write('WRONG')
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("WRONG")
     self.assertTrue(os.path.exists(
         os.path.join('test', 'buildbot.tac.new')))
     self.assertInStdout('not touching existing buildbot.tac')
 def test_makeTAC_existing_incorrect(self):
     with open(os.path.join('test', 'buildbot.tac'), 'wt') as f:
         f.write('WRONG')
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("WRONG")
     self.assertTrue(os.path.exists(
         os.path.join('test', 'buildbot.tac.new')))
     self.assertInStdout('not touching existing buildbot.tac')
 def test_makeTAC_none_log_count(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-count': None}))
     self.assertInTacFile("\nmaxRotatedFiles = None\n")
     self.assertWasQuiet()
 def test_makeTAC_int_log_size(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-size': 3000}))
     self.assertInTacFile("\nrotateLength = 3000\n")
     self.assertWasQuiet()
 def test_makeTAC_relocatable(self):
     create_master.makeTAC(mkconfig(basedir='test', relocatable=True))
     self.assertInTacFile("basedir = '.'")  # repr() prefers ''
     self.assertWasQuiet()
 def test_makeTAC_no_logrotate(self):
     create_master.makeTAC(
         mkconfig(basedir='test', **{'no-logrotate': True}))
     self.assertNotInTacFile("import Log")
     self.assertWasQuiet()
Beispiel #8
0
 def test_makeTAC_existing_correct(self):
     create_master.makeTAC(mkconfig(basedir='test', quiet=True))
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertFalse(os.path.exists(
         os.path.join('test', 'buildbot.tac.new')))
     self.assertInStdout('and is correct')
 def test_makeTAC(self):
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("Application('buildmaster')")
     self.assertWasQuiet()
 def test_makeTAC_existing_incorrect_quiet(self):
     with open(os.path.join('test', 'buildbot.tac'), 'wt') as f:
         f.write('WRONG')
     create_master.makeTAC(mkconfig(basedir='test', quiet=True))
     self.assertInTacFile("WRONG")
     self.assertWasQuiet()
Beispiel #11
0
 def test_makeTAC(self):
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("Application('buildmaster')")
     self.assertWasQuiet()
Beispiel #12
0
 def test_makeTAC_int_log_size(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-size': 3000}))
     self.assertInTacFile("\nrotateLength = 3000\n")
     self.assertWasQuiet()
Beispiel #13
0
 def test_makeTAC_str_log_size(self):
     with self.assertRaises(TypeError):
         create_master.makeTAC(mkconfig(basedir='test',
                               **{'log-size': '3000'}))
Beispiel #14
0
 def test_makeTAC_none_log_count(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-count': None}))
     self.assertInTacFile("\nmaxRotatedFiles = None\n")
     self.assertWasQuiet()
Beispiel #15
0
 def test_makeTAC_no_logrotate(self):
     create_master.makeTAC(
         mkconfig(basedir='test', **{'no-logrotate': True}))
     self.assertNotInTacFile("import Log")
     self.assertWasQuiet()
Beispiel #16
0
 def test_makeTAC_relocatable(self):
     create_master.makeTAC(mkconfig(basedir='test', relocatable=True))
     self.assertInTacFile("basedir = '.'")  # repr() prefers ''
     self.assertWasQuiet()
 def test_makeTAC_str_log_size(self):
     with self.assertRaises(TypeError):
         create_master.makeTAC(mkconfig(basedir='test',
                               **{'log-size': '3000'}))
 def test_makeTAC_existing_incorrect_quiet(self):
     with open(os.path.join("test", "buildbot.tac"), "wt") as f:
         f.write("WRONG")
     create_master.makeTAC(mkconfig(basedir="test", quiet=True))
     self.assertInTacFile("WRONG")
     self.assertWasQuiet()
Beispiel #19
0
 def test_makeTAC_existing_incorrect_quiet(self):
     with open(os.path.join('test', 'buildbot.tac'), 'wt') as f:
         f.write('WRONG')
     create_master.makeTAC(mkconfig(basedir='test', quiet=True))
     self.assertInTacFile("WRONG")
     self.assertWasQuiet()
 def test_makeTAC_existing_correct(self):
     create_master.makeTAC(mkconfig(basedir="test", quiet=True))
     create_master.makeTAC(mkconfig(basedir="test"))
     self.assertFalse(os.path.exists(os.path.join("test", "buildbot.tac.new")))
     self.assertInStdout("and is correct")
 def test_makeTAC_existing_correct(self):
     create_master.makeTAC(mkconfig(basedir='test', quiet=True))
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertFalse(os.path.exists(
         os.path.join('test', 'buildbot.tac.new')))
     self.assertInStdout('and is correct')
 def test_makeTAC_int_log_count(self):
     create_master.makeTAC(mkconfig(basedir="test", **{"log-count": 30}))
     self.assertInTacFile("\nmaxRotatedFiles = 30\n")
     self.assertWasQuiet()