Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: verification/fake.py

Issue 138173005: CQ to always post a message when Commit box is unchecked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: Addressed reviewer's comments Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/pending_manager_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: verification/fake.py
diff --git a/verification/fake.py b/verification/fake.py
index c38009e3de161acaedcf9f1ba07ec2e12016d73b..9b95854c46c876d7a1d84e851eb3819de87a9c92 100644
--- a/verification/fake.py
+++ b/verification/fake.py
@@ -6,6 +6,8 @@
from verification import base
+def failed_message():
+ return 'FakeVerifier FAILED'
class FakeVerifier(base.Verifier):
name = 'fake'
@@ -15,7 +17,11 @@ class FakeVerifier(base.Verifier):
self.state = state
def verify(self, pending):
- pending.verifications[self.name] = base.SimpleStatus(self.state)
+ fake = base.SimpleStatus(self.state)
+ # Make sure to leave a message, so CQ tests can reliably test for it.
+ if self.state == base.FAILED:
+ fake.error_message = failed_message()
+ pending.verifications[self.name] = fake
def update_status(self, queue):
pass
@@ -39,3 +45,6 @@ class DeferredFakeVerifier(base.Verifier):
for _, fake in self.loop(queue, base.SimpleStatus, True):
fake.state = self.state
+ # Make sure to leave a message, so CQ tests can reliably test for it.
+ if self.state == base.FAILED:
+ fake.error_message = failed_message()
« no previous file with comments | « tests/pending_manager_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698