Add base class for reporters
and test the all reporters adhere to the set contract.
Also standardise the reporter (triggers+sources to come) class names
to NameReporter.
This will make it easier to do more reporters in the future and also
add the possibility of loading reporters dynamically.
Co-Authored-By: Gregory Haynes <greg@greghaynes.net>
Change-Id: Ie67537c44bbb0dc5aa2a4708ffb5d381ce7e80fc
diff --git a/tests/base.py b/tests/base.py
index 9316b43..7cd9de3 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1041,8 +1041,8 @@
def register_reporters(self):
# Register the available reporters
self.sched.registerReporter(
- zuul.reporter.gerrit.Reporter(self.fake_gerrit))
- self.smtp_reporter = zuul.reporter.smtp.Reporter(
+ zuul.reporter.gerrit.GerritReporter(self.fake_gerrit))
+ self.smtp_reporter = zuul.reporter.smtp.SMTPReporter(
self.config.get('smtp', 'default_from'),
self.config.get('smtp', 'default_to'),
self.config.get('smtp', 'server'))