Exemplo n.º 1
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")
Exemplo n.º 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')
Exemplo n.º 3
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')
Exemplo n.º 4
0
 def test_makeTAC_none_log_count(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-count': None}))
     self.assertInTacFile("\nmaxRotatedFiles = None\n")
     self.assertWasQuiet()
Exemplo n.º 5
0
 def test_makeTAC_int_log_size(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-size': 3000}))
     self.assertInTacFile("\nrotateLength = 3000\n")
     self.assertWasQuiet()
Exemplo n.º 6
0
 def test_makeTAC_relocatable(self):
     create_master.makeTAC(mkconfig(basedir='test', relocatable=True))
     self.assertInTacFile("basedir = '.'")  # repr() prefers ''
     self.assertWasQuiet()
Exemplo n.º 7
0
 def test_makeTAC_no_logrotate(self):
     create_master.makeTAC(
         mkconfig(basedir='test', **{'no-logrotate': True}))
     self.assertNotInTacFile("import Log")
     self.assertWasQuiet()
Exemplo n.º 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')
Exemplo n.º 9
0
 def test_makeTAC(self):
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("Application('buildmaster')")
     self.assertWasQuiet()
Exemplo n.º 10
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()
Exemplo n.º 11
0
 def test_makeTAC(self):
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("Application('buildmaster')")
     self.assertWasQuiet()
Exemplo n.º 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()
Exemplo n.º 13
0
 def test_makeTAC_str_log_size(self):
     with self.assertRaises(TypeError):
         create_master.makeTAC(mkconfig(basedir='test',
                               **{'log-size': '3000'}))
Exemplo n.º 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()
Exemplo n.º 15
0
 def test_makeTAC_no_logrotate(self):
     create_master.makeTAC(
         mkconfig(basedir='test', **{'no-logrotate': True}))
     self.assertNotInTacFile("import Log")
     self.assertWasQuiet()
Exemplo n.º 16
0
 def test_makeTAC_relocatable(self):
     create_master.makeTAC(mkconfig(basedir='test', relocatable=True))
     self.assertInTacFile("basedir = '.'")  # repr() prefers ''
     self.assertWasQuiet()
Exemplo n.º 17
0
 def test_makeTAC_str_log_size(self):
     with self.assertRaises(TypeError):
         create_master.makeTAC(mkconfig(basedir='test',
                               **{'log-size': '3000'}))
Exemplo n.º 18
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()
Exemplo n.º 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()
Exemplo n.º 20
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")
Exemplo n.º 21
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')
Exemplo n.º 22
0
 def test_makeTAC_int_log_count(self):
     create_master.makeTAC(mkconfig(basedir="test", **{"log-count": 30}))
     self.assertInTacFile("\nmaxRotatedFiles = 30\n")
     self.assertWasQuiet()