def test_flag_permission_rejection_message(self): validator = CommitterValidator(bugzilla=None) expected_messsage = """[email protected] does not have review permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/committers.py. - If you do not have review rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have review rights please correct the error in WebKitTools/Scripts/webkitpy/committers.py by adding yourself to the file (no review needed). Due to bug 30084 the commit-queue will require a restart after your change. Please contact [email protected] to request a commit-queue restart. After restart the commit-queue will correctly respect your review rights.""" self.assertEqual( validator._flag_permission_rejection_message( "*****@*****.**", "review"), expected_messsage)
def handle_script_error(cls, tool, state, script_error): status_id = cls._update_status_for_script_error(tool, state, script_error) validator = CommitterValidator(tool.bugs) validator.reject_patch_from_commit_queue(state["patch"].id(), cls._error_message_for_bug(tool, status_id, script_error))
def begin_work_queue(self): AbstractPatchQueue.begin_work_queue(self) self.committer_validator = CommitterValidator(self.tool.bugs)