/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 breezy/tests/blackbox/test_commit.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-01 21:57:00 UTC
  • mfrom: (7490.39.3 move-launchpad)
  • Revision ID: breezy.the.bot@gmail.com-20200601215700-joxuzo6w172gq74v
Move launchpad hoster support to the launchpad plugin.

Merged from https://code.launchpad.net/~jelmer/brz/move-launchpad/+merge/384931

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    features,
37
37
    )
38
38
from .. import TestCaseWithTransport
 
39
from ..matchers import ContainsNoVfsCalls
39
40
from ..test_bedding import override_whoami
40
41
 
41
42
 
894
895
 
895
896
        self.run_bzr('ci -m "non-ascii mv"')
896
897
 
 
898
 
 
899
class TestSmartServerCommit(TestCaseWithTransport):
 
900
 
 
901
    def test_commit_to_lightweight(self):
 
902
        self.setup_smart_server_with_call_log()
 
903
        t = self.make_branch_and_tree('from')
 
904
        for count in range(9):
 
905
            t.commit(message='commit %d' % count)
 
906
        out, err = self.run_bzr(['checkout', '--lightweight', self.get_url('from'),
 
907
                                 'target'])
 
908
        self.reset_smart_call_log()
 
909
        self.build_tree(['target/afile'])
 
910
        self.run_bzr(['add', 'target/afile'])
 
911
        out, err = self.run_bzr(['commit', '-m', 'do something', 'target'])
 
912
        # This figure represent the amount of work to perform this use case. It
 
913
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
914
        # being too low. If rpc_count increases, more network roundtrips have
 
915
        # become necessary for this use case. Please do not adjust this number
 
916
        # upwards without agreement from bzr's network support maintainers.
 
917
        self.assertLength(211, self.hpss_calls)
 
918
        self.assertLength(2, self.hpss_connections)
 
919
        self.expectFailure("commit still uses VFS calls",
 
920
                           self.assertThat, self.hpss_calls, ContainsNoVfsCalls)