/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: Jelmer Vernooij
  • Date: 2019-03-05 07:32:38 UTC
  • mto: (7290.1.21 work)
  • mto: This revision was merged to the branch mainline in revision 7311.
  • Revision ID: jelmer@jelmer.uk-20190305073238-zlqn981opwnqsmzi
Add appveyor configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
 
from io import (
19
 
    BytesIO,
20
 
    )
21
18
 
22
19
from ... import (
23
20
    branch,
25
22
    tests,
26
23
    )
27
24
from ...controldir import ControlDir
28
 
from ...bzr.bundle import serializer
 
25
from ...bundle import serializer
 
26
from ...sixish import (
 
27
    BytesIO,
 
28
    )
29
29
from ...transport import memory
30
30
from .. import (
31
31
    scenarios,
32
32
    )
 
33
from ..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)