Use null values instead of the empty dict for sql reporter

Change-Id: I23793e99e6ab6afdbe2f76a4433719a7f234ef5d
This commit is contained in:
James E. Blair 2017-08-04 09:48:59 -07:00
parent b4eab9274d
commit d5e2956411
3 changed files with 9 additions and 8 deletions

View File

@ -51,11 +51,12 @@ For example:
- pipeline:
name: post-merge
success:
mydb_conn: {}
mydb_conn:
failure:
mydb_conn: {}
mydb_conn:
.. attr:: pipeline.<reporter>.<sql source>
To report to a database, add an empty dictionary to the desired
pipeline :ref:`reporter<reporters>` attributes.
To report to a database, add a key with the connection name and an
empty value to the desired pipeline :ref:`reporter<reporters>`
attributes.

View File

@ -7,12 +7,12 @@
success:
gerrit:
Verified: 1
resultsdb: {}
resultsdb:
failure:
gerrit:
Verified: -1
resultsdb: {}
resultsdb_failures: {}
resultsdb:
resultsdb_failures:
- job:
name: project-merge

View File

@ -79,5 +79,5 @@ class SQLReporter(BaseReporter):
def getSchema():
sql_reporter = v.Schema({})
sql_reporter = v.Schema(None)
return sql_reporter