/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_serve.py

  • Committer: Martin Pool
  • Date: 2009-09-14 01:48:28 UTC
  • mfrom: (4685 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4688.
  • Revision ID: mbp@sourcefrog.net-20090914014828-ydr9rlkdfq2sv57z
Merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
        ssh_server = SFTPServer(StubSSHServer)
210
210
        # XXX: We *don't* want to override the default SSH vendor, so we set
211
211
        # _vendor to what _get_ssh_vendor returns.
212
 
        ssh_server.setUp()
213
 
        self.addCleanup(ssh_server.tearDown)
 
212
        self.start_server(ssh_server)
214
213
        port = ssh_server._listener.port
215
214
 
216
215
        # Access the branch via a bzr+ssh URL.  The BZR_REMOTE_PATH environment
256
255
        t = self.get_transport()
257
256
        t.mkdir('server-root')
258
257
        self.run_bzr_serve_then_func(
259
 
            ['--port', '0', '--directory', t.local_abspath('server-root'),
 
258
            ['--port', '127.0.0.1:0',
 
259
             '--directory', t.local_abspath('server-root'),
260
260
             '--allow-writes'],
261
261
            self.when_server_started)
262
262
        # The when_server_started method issued a find_repositoryV3 that should
263
263
        # fail with 'norepository' because there are no repositories inside the
264
264
        # --directory.
265
265
        self.assertEqual(('norepository',), self.client_resp)
266
 
        
 
266
 
267
267
    def run_bzr_serve_then_func(self, serve_args, func, *func_args,
268
268
            **func_kwargs):
269
269
        """Run 'bzr serve', and run the given func in a thread once the server