~launchpad-pqm/launchpad/devel

8687.15.8 by Karl Fogel
Add the copyright header block to more files.
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
2908.4.16 by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review.
3
4
# Twisted Application Configuration file.
5
# Use with "twistd2.4 -y <file.tac>", e.g. "twistd -noy server.tac"
6
7
import os
8
9
from twisted.application import service, internet, strports
10
from twisted.web import server
11
11765.1.1 by Robert Collins
Split out the launchpad-buildd needed component from tachandler.py.
12
from canonical.launchpad.daemons import readyservice
8322.4.1 by Curtis Hovey
Moved the distributionmirror objects to lp.registry.
13
from lp.registry.tests.distributionmirror_http_server import (
2908.4.16 by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review.
14
    DistributionMirrorTestHTTPServer)
15
16
17
application = service.Application('DistributionMirrorTestHTTPServer')
18
httpserverService = service.IServiceCollection(application)
19
20
# Service that announces when the daemon is ready
11765.1.1 by Robert Collins
Split out the launchpad-buildd needed component from tachandler.py.
21
readyservice.ReadyService().setServiceParent(httpserverService)
2908.4.16 by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review.
22
23
root = DistributionMirrorTestHTTPServer()
24
site = server.Site(root)
25
site.displayTracebacks = False
6916.1.4 by Curtis Hovey
Fixed malformed comments found after the end of file loop was fixed in xxxreport.py.
26
# XXX: Guilherme Salgado 2007-01-30: The port 11375 is what we use in the
27
# URLs of our mirrors in sampledata, so we need to use the same here.
2908.4.16 by Guilherme Salgado
Change a lot of tests to use twisted's facilities and improve some of them. Also refactor lots of code and fix some things as per Andrew's review.
28
strports.service("11375", site).setServiceParent(httpserverService)