~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2012-03-04 18:47:59 UTC
  • mfrom: (6475.2.3 544054-serve-port)
  • Revision ID: pqm@pqm.ubuntu.com-20120304184759-kpae3rpzzscn4vjm
(jelmer) Split the --port option into --listen and --port. (Ross Lagerwall)

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
        SmartTCPServer.hooks.install_named_hook(
123
123
            'server_exception', hook,
124
124
            'test_server_except_hook hook')
125
 
        args = ['--port', 'localhost:0', '--quiet']
 
125
        args = ['--listen', 'localhost', '--port', '0', '--quiet']
126
126
        out, err = self.run_bzr_serve_then_func(args, retcode=0)
127
127
        self.assertEqual('catching KeyboardInterrupt\n', err)
128
128
 
190
190
            finish_bzr_subprocess, and the base url for the server.
191
191
        """
192
192
        # Serve from the current directory
193
 
        args = ['serve', '--port', 'localhost:0']
 
193
        args = ['serve', '--listen', 'localhost', '--port', '0']
194
194
        args.extend(extra_options)
195
195
        process = self.start_bzr_subprocess(args, skip_if_plan_to_signal=True)
196
196
        port_line = process.stderr.readline()
203
203
 
204
204
    def test_bzr_serve_quiet(self):
205
205
        self.make_branch('.')
206
 
        args = ['--port', 'localhost:0', '--quiet']
 
206
        args = ['--listen', 'localhost', '--port', '0', '--quiet']
207
207
        out, err = self.run_bzr_serve_then_func(args, retcode=3)
208
208
        self.assertEqual('', out)
209
209
        self.assertEqual('', err)
354
354
        t = self.get_transport()
355
355
        t.mkdir('server-root')
356
356
        self.run_bzr_serve_then_func(
357
 
            ['--port', '127.0.0.1:0',
 
357
            ['--listen', 'localhost', '--port', '0',
358
358
             '--directory', t.local_abspath('server-root'),
359
359
             '--allow-writes'],
360
360
            func=self.when_server_started)