moving readiness checks into stream
this changes the interface to move the readiness check out of the classifier and into the stream object. This massively simplifies the logic connecting these pieces, as classifier is now just a thin wrapper to elastic search. This also adds unit testing for the stream processing through the creation of a fake_gerrit mock class. That lets us run gerrit event interactions in a sane way. It also drops all the unit testing for the classifier which is now largely useless, because all it tests is we can execute a for loop. Change-Id: I1971c121276412e31f01eb5680b9c41fc7e442d3
This commit is contained in:
@@ -59,7 +59,7 @@ def generic(raw_query, facet=None):
|
||||
return query
|
||||
|
||||
|
||||
def result_ready(review=None, patch=None):
|
||||
def result_ready(review=None, patch=None, name=None):
|
||||
"""A query to determine if we have a failure for a particular patch.
|
||||
|
||||
This is looking for a particular FAILURE line in the console log, which
|
||||
@@ -70,8 +70,9 @@ def result_ready(review=None, patch=None):
|
||||
'OR message:"[SCP] Copying console log") '
|
||||
'AND build_status:"FAILURE" '
|
||||
'AND build_change:"%s" '
|
||||
'AND build_patchset:"%s"' %
|
||||
(review, patch))
|
||||
'AND build_patchset:"%s" '
|
||||
'AND build_name:"%s"' %
|
||||
(review, patch, name))
|
||||
|
||||
|
||||
def files_ready(review, patch):
|
||||
|
||||
Reference in New Issue
Block a user