~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-11-22 23:20:48 UTC
  • mto: This revision was merged to the branch mainline in revision 6284.
  • Revision ID: jelmer@samba.org-20111122232048-vnbcf8a0fi4twr8f
Add hpss call count test for 'bzr ls'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
from bzrlib import ignores, osutils
 
21
from bzrlib import ignores
22
22
from bzrlib.tests import TestCaseWithTransport
23
23
 
24
24
 
244
244
        self.wt.commit('commit')
245
245
        self.ls_equals('sub/\nsub/file\n', '--directory=dir')
246
246
        self.ls_equals('sub/file\n', '-d dir sub')
 
247
 
 
248
 
 
249
class TestSmartServerLs(TestCaseWithTransport):
 
250
 
 
251
    def test_simple_ls(self):
 
252
        self.setup_smart_server_with_call_log()
 
253
        t = self.make_branch_and_tree('branch')
 
254
        self.build_tree_contents([('branch/foo', 'thecontents')])
 
255
        t.add("foo")
 
256
        t.commit("message")
 
257
        self.reset_smart_call_log()
 
258
        out, err = self.run_bzr(['ls', self.get_url('branch')])
 
259
        # This figure represent the amount of work to perform this use case. It
 
260
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
261
        # being too low. If rpc_count increases, more network roundtrips have
 
262
        # become necessary for this use case. Please do not adjust this number
 
263
        # upwards without agreement from bzr's network support maintainers.
 
264
        self.assertLength(15, self.hpss_calls)