Add facility for plugins to register web routes
Rather than special-casing github and sql in zuul-web, add a
registration method to Connection to allow a Connection to register
routes.
Provide two types of WebHandler classes - a 'raw' class and a 'driver'
class. The driver class prepends '/connection/{connection}' to the
provided path.
Shift the github webhook and SQL web methods to use the plugin interface.
Change-Id: I065937b20447248e7894e1dfeec269faa6fd30d2
diff --git a/tests/unit/test_github_driver.py b/tests/unit/test_github_driver.py
index 7aca428..cd36ba3 100644
--- a/tests/unit/test_github_driver.py
+++ b/tests/unit/test_github_driver.py
@@ -751,7 +751,7 @@
self.web = zuul.web.ZuulWeb(
listen_address='127.0.0.1', listen_port=0,
gear_server='127.0.0.1', gear_port=self.gearman_server.port,
- github_connections={'github': self.fake_github})
+ connections=[self.fake_github])
loop = asyncio.new_event_loop()
loop.set_debug(True)
ws_thread = threading.Thread(target=self.web.run, args=(loop,))