コード例 #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")
コード例 #2
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 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')
コード例 #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')
コード例 #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()
コード例 #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()
コード例 #6
0
 def test_makeTAC_relocatable(self):
     create_master.makeTAC(mkconfig(basedir='test', relocatable=True))
     self.assertInTacFile("basedir = '.'")  # repr() prefers ''
     self.assertWasQuiet()
コード例 #7
0
 def test_makeTAC_no_logrotate(self):
     create_master.makeTAC(
         mkconfig(basedir='test', **{'no-logrotate': True}))
     self.assertNotInTacFile("import Log")
     self.assertWasQuiet()
コード例 #8
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 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')
コード例 #9
0
 def test_makeTAC(self):
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("Application('buildmaster')")
     self.assertWasQuiet()
コード例 #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()
コード例 #11
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 def test_makeTAC(self):
     create_master.makeTAC(mkconfig(basedir='test'))
     self.assertInTacFile("Application('buildmaster')")
     self.assertWasQuiet()
コード例 #12
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 def test_makeTAC_int_log_size(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-size': 3000}))
     self.assertInTacFile("\nrotateLength = 3000\n")
     self.assertWasQuiet()
コード例 #13
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 def test_makeTAC_str_log_size(self):
     with self.assertRaises(TypeError):
         create_master.makeTAC(mkconfig(basedir='test',
                               **{'log-size': '3000'}))
コード例 #14
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 def test_makeTAC_none_log_count(self):
     create_master.makeTAC(mkconfig(basedir='test', **{'log-count': None}))
     self.assertInTacFile("\nmaxRotatedFiles = None\n")
     self.assertWasQuiet()
コード例 #15
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 def test_makeTAC_no_logrotate(self):
     create_master.makeTAC(
         mkconfig(basedir='test', **{'no-logrotate': True}))
     self.assertNotInTacFile("import Log")
     self.assertWasQuiet()
コード例 #16
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 def test_makeTAC_relocatable(self):
     create_master.makeTAC(mkconfig(basedir='test', relocatable=True))
     self.assertInTacFile("basedir = '.'")  # repr() prefers ''
     self.assertWasQuiet()
コード例 #17
0
 def test_makeTAC_str_log_size(self):
     with self.assertRaises(TypeError):
         create_master.makeTAC(mkconfig(basedir='test',
                               **{'log-size': '3000'}))
コード例 #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()
コード例 #19
0
ファイル: test_create_master.py プロジェクト: p12tic/buildbot
 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()
コード例 #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")
コード例 #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')
コード例 #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()