[announce] local_test_server plugin

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Jun 13 08:04:15 BST 2008


Hi,

local_test_server is a bzr plugin targeted at bzr developers or
admins.

It allows presenting some specially configured servers to the bzr
test suite.

The special configuration bits are related to the way the
transport tests are written: they require access to the files
served both through the server itself and directly via the file
system.

Also you don't want to launch such servers for each test,
instead, the plugin provides commands to start and stop the
servers, check their availability with the Feature mechanism and
inject them in the test suite when they are running.

The aims of the plugin are:

- make it easy to check that bzr can be used with a server,

- helps developers implement new features in the client side of a
  protocol without requiring them to implement a test server
  first,

- help developers implement test servers for a protocol.

The aims of the plugin are not:

- to add dependencies to the bzr test suite (the suite must
  remain self contained),

- to avoid fixing the threads leaked by our actual test servers
  :-)

The servers supported today are:

- apache2
- lighttpd,
- cherokee,
- apache2 with DAV module,
- lighttpd with DAV module (demonstrating that the webdav plugin
  can't be used with it yet)

Even if all of them are http servers, nothing precludes the use
of the plugin for other protocols.

I've used it with success to implement list_dir() (and stat() and
iter_files_recursive()) in the webdav plugin:

- start a webdav enabled server,
- run the test suite,
- fix failing tests until the webdav client passed the test suite
  against the local test server,
- fix failing tests until the webdav test server passed the test
  suite.

As usual, comment, thoughts, patches all welcome,

   Vincent



More information about the bazaar mailing list