Add base class for triggers
and test the all triggers adhere to the set contract.
Also standardise the trigger class names to NameTrigger.
This will make it easier to do more triggers in the future and also
add the possibility of loading triggers dynamically.
Co-Authored-By: Gregory Haynes <greg@greghaynes.net>
Change-Id: I283bffad97edb91a6a2258163d4162a15b904757
diff --git a/tests/base.py b/tests/base.py
index 67de802..731d842 100755
--- a/tests/base.py
+++ b/tests/base.py
@@ -1027,12 +1027,12 @@
def register_triggers(self):
# Register the available triggers
- self.gerrit_trigger = zuul.trigger.gerrit.Gerrit(
+ self.gerrit_trigger = zuul.trigger.gerrit.GerritTrigger(
self.fake_gerrit, self.config, self.sched, self.gerrit_source)
self.gerrit_trigger.gerrit_connector.delay = 0.0
self.sched.registerTrigger(self.gerrit_trigger)
- self.timer = zuul.trigger.timer.Timer(self.config, self.sched)
+ self.timer = zuul.trigger.timer.TimerTrigger(self.config, self.sched)
self.sched.registerTrigger(self.timer)
self.zuultrigger = zuul.trigger.zuultrigger.ZuulTrigger(self.config,
self.sched)