l.s.d.t.TacTestSetup(TacTestFixture) : class documentation

Part of lp.services.daemons.tachandler View In Hierarchy

Known subclasses: lp.buildmaster.tests.harness.BuilddManagerTestSetup, lp.codehosting.tests.servers.CodeHostingTac, lp.registry.tests.test_distributionmirror_prober.HTTPServerTestSetup, lp.services.daemons.tests.test_tachandler.SimpleTac, lp.services.librarian.tests.test_client.FakeServerTestSetup, lp.services.librarianserver.testing.server.LibrarianServerFixture, lp.testing.keyserver.__init__.KeyServerTac

Setup an TAC file as daemon for use by functional tests.

You must override setUpRoot to set up a root directory for the daemon.

Method setUp Undocumented
Method removeLog Undocumented
Method truncateLog Truncate the log file.
Method daemon_directory Undocumented
Method setUpRoot Override this.
Method _hasDaemonStarted Has the daemon started?
def setUp(self, spew=False, umask=None):
Undocumented
def _hasDaemonStarted(self):
Has the daemon started?

Startup is recognized by the appearance of readyservice.LOG_MAGIC in the log file.

def removeLog(self):
Undocumented
def truncateLog(self):
Truncate the log file.

Leaves everything up to and including the LOG_MAGIC marker in place. If the LOG_MAGIC marker is not found the log is truncated to 0 bytes.

@property
def daemon_directory(self):
Undocumented
def setUpRoot(self):
Override this.

This should be able to cope with the root already existing, because it will be left behind after each test in case it's needed to diagnose a test failure (e.g. log files might contain helpful tracebacks).

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.