]> git.ipfire.org Git - pbs.git/commitdiff
hub: Drop test handlers
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Jul 2022 16:31:47 +0000 (16:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Jul 2022 16:31:47 +0000 (16:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hub/__init__.py
src/hub/handlers.py

index 4bc3a6096a55d9aa5b168956926958d44b85f4d3..6184406f17a7198c40b4a5580f8b6e07d8559909 100644 (file)
@@ -18,11 +18,6 @@ class Application(tornado.web.Application):
                        # Redirect strayed users.
                        (r"/", tornado.web.RedirectHandler, { "url" : "https://pakfire.ipfire.org/" }),
 
-                       # Test handlers
-                       (r"/noop", handlers.NoopHandler),
-                       (r"/error/test", handlers.ErrorTestHandler),
-                       (r"/error/test/(\d+)", handlers.ErrorTestHandler),
-
                        # Builds
                        (r"/builds", builds.CreateHandler),
                        (r"/builds/(.*)", handlers.BuildsGetHandler),
index 6ffa91f258de2b6994f24cb187fb54a2d2b66672..82dceb7575a126bfb8b634b1fdb2b7857aac6280 100644 (file)
@@ -109,31 +109,6 @@ class BaseHandler(BackendMixin, HTTPBasicAuthMixin, tornado.web.RequestHandler):
                        return self.backend.uploads.get_by_uuid(uuid)
 
 
-class NoopHandler(BaseHandler):
-       def get(self):
-               if self.builder:
-                       self.write("Welcome to the Pakfire hub, %s!" % self.builder.hostname)
-               elif self.user:
-                       self.write("Welcome to the Pakfire hub, %s!" % self.user.name)
-               else:
-                       self.write("Welcome to the Pakfire hub!")
-
-
-class ErrorTestHandler(BaseHandler):
-       def get(self, error_code=200):
-               """
-                       For testing a client.
-
-                       This just returns a HTTP response with the given code.
-               """
-               try:
-                       error_code = int(error_code)
-               except ValueError:
-                       error_code = 200
-
-               raise tornado.web.HTTPError(error_code)
-
-
 # Builds
 
 class BuildsGetHandler(BaseHandler):