~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir_colo/__init__.py

  • Committer: Patch Queue Manager
  • Date: 2012-01-28 13:24:39 UTC
  • mfrom: (6450.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20120128132439-phvlss4cq7bf5rji
(jelmer) Merge the 2.5 branch. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.tests import (
28
28
    default_transport,
29
29
    multiply_tests,
 
30
    test_server,
30
31
    )
31
32
from bzrlib.tests.per_controldir import (
32
33
    TestCaseWithControlDir,
33
34
    make_scenarios,
34
35
    )
 
36
from bzrlib.transport import memory
35
37
 
36
38
 
37
39
def load_tests(standard_tests, module, loader):
38
40
    colo_supported_formats = []
39
41
    colo_unsupported_formats = []
 
42
    # This will always add scenarios using the smart server.
 
43
    from bzrlib.remote import RemoteBzrDirFormat
40
44
    for format in ControlDirFormat.known_formats():
 
45
        if isinstance(format, RemoteBzrDirFormat):
 
46
            continue
41
47
        if format.colocated_branches:
42
48
            colo_supported_formats.append(format)
43
49
        else:
46
52
        colo_supported_formats)
47
53
    unsupported_scenarios = make_scenarios(default_transport, None, None,
48
54
        colo_unsupported_formats)
 
55
    # test the remote server behaviour when backed with a MemoryTransport
 
56
    # Once for the current version
 
57
    unsupported_scenarios.extend(make_scenarios(
 
58
        memory.MemoryServer,
 
59
        test_server.SmartTCPServer_for_testing,
 
60
        test_server.ReadonlySmartTCPServer_for_testing,
 
61
        [(RemoteBzrDirFormat())],
 
62
        name_suffix='-default'))
 
63
    # And once with < 1.6 - the 'v2' protocol.
 
64
    unsupported_scenarios.extend(make_scenarios(
 
65
        memory.MemoryServer,
 
66
        test_server.SmartTCPServer_for_testing_v2_only,
 
67
        test_server.ReadonlySmartTCPServer_for_testing_v2_only,
 
68
        [(RemoteBzrDirFormat())],
 
69
        name_suffix='-v2'))
 
70
 
49
71
    result = loader.suiteClass()
50
72
    supported_tests = loader.loadTestsFromModuleNames([
51
73
        'bzrlib.tests.per_controldir_colo.test_supported'])