def test_checkBasedir_active_pidfile(self):
     self.activeBasedir()
     open(os.path.join('test', 'twistd.pid'), 'w').close()
     rv = upgrade_master.checkBasedir(mkconfig())
     self.assertFalse(rv)
     self.assertInStdout('still running')
 def test_checkBasedir_quiet(self):
     self.activeBasedir()
     rv = upgrade_master.checkBasedir(mkconfig(quiet=True))
     self.assertTrue(rv)
     self.assertWasQuiet()
 def test_checkBasedir_no_dir(self):
     rv = upgrade_master.checkBasedir(mkconfig(basedir='doesntexist'))
     self.assertFalse(rv)
     self.assertInStdout('invalid buildmaster directory')
 def test_checkBasedir_invalid_maxRotatedFiles(self):
     self.activeBasedir(extra_lines=['maxRotatedFiles="64"'])
     rv = upgrade_master.checkBasedir(mkconfig())
     self.assertFalse(rv)
     self.assertInStdout('WARNING')
     self.assertInStdout('maxRotatedFiles')
 def test_checkBasedir(self):
     self.activeBasedir()
     rv = upgrade_master.checkBasedir(mkconfig())
     self.assertTrue(rv)
     self.assertInStdout('checking basedir')
 def test_checkBasedir_invalid_rotateLength(self):
     self.activeBasedir(extra_lines=['rotateLength="32"'])
     rv = upgrade_master.checkBasedir(mkconfig())
     self.assertFalse(rv)
     self.assertInStdout('WARNING')
     self.assertInStdout('rotateLength')
 def test_checkBasedir_invalid_maxRotatedFiles(self):
     self.activeBasedir(extra_lines=['maxRotatedFiles="64"'])
     rv = upgrade_master.checkBasedir(mkconfig())
     self.assertFalse(rv)
     self.assertInStdout('ERROR')
     self.assertInStdout('maxRotatedFiles')
 def test_checkBasedir_invalid_rotateLength(self):
     self.activeBasedir(extra_lines=['rotateLength="32"'])
     rv = upgrade_master.checkBasedir(mkconfig())
     self.assertFalse(rv)
     self.assertInStdout('ERROR')
     self.assertInStdout('rotateLength')
 def test_checkBasedir_no_dir(self):
     rv = upgrade_master.checkBasedir(mkconfig(basedir='doesntexist'))
     self.assertFalse(rv)
     self.assertInStdout('is not a Buildbot basedir')
예제 #10
0
 def test_checkBasedir_no_dir(self):
     rv = upgrade_master.checkBasedir(mkconfig(basedir='doesntexist'))
     self.assertFalse(rv)
     self.assertInStdout('is not a Buildbot basedir')