/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_send.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-11 12:46:45 UTC
  • mfrom: (7511.1.1 actions-no-fork)
  • Revision ID: breezy.the.bot@gmail.com-20200611124645-4lx66gps99i0hmzh
Avoid using fork when running the testsuite in github actions.

Merged from https://code.launchpad.net/~jelmer/brz/actions-no-fork/+merge/385565

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from .. import (
31
31
    scenarios,
32
32
    )
 
33
from ...bzr.tests.matchers import ContainsNoVfsCalls
33
34
 
34
35
 
35
36
load_tests = scenarios.load_tests_apply_scenarios
447
448
 
448
449
    _default_command = ['bundle-revisions', '../parent']
449
450
 
 
451
 
 
452
class TestSmartServerSend(tests.TestCaseWithTransport):
 
453
 
 
454
    def test_send(self):
 
455
        self.setup_smart_server_with_call_log()
 
456
        t = self.make_branch_and_tree('branch')
 
457
        self.build_tree_contents([('branch/foo', b'thecontents')])
 
458
        t.add("foo")
 
459
        t.commit("message")
 
460
        local = t.controldir.sprout('local-branch').open_workingtree()
 
461
        self.build_tree_contents([('branch/foo', b'thenewcontents')])
 
462
        local.commit("anothermessage")
 
463
        self.reset_smart_call_log()
 
464
        out, err = self.run_bzr(
 
465
            ['send', '-o', 'x.diff', self.get_url('branch')], working_dir='local-branch')
 
466
        # This figure represent the amount of work to perform this use case. It
 
467
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
468
        # being too low. If rpc_count increases, more network roundtrips have
 
469
        # become necessary for this use case. Please do not adjust this number
 
470
        # upwards without agreement from bzr's network support maintainers.
 
471
        self.assertLength(7, self.hpss_calls)
 
472
        self.assertLength(1, self.hpss_connections)
 
473
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)