27
27
from bzrlib.bzrdir import BzrDirFormat
28
28
from bzrlib.tests import (
31
TestCaseWithTransport,
33
from bzrlib.transport.memory import MemoryServer
32
TestCaseWithTransport,
34
from bzrlib.transport import memory
36
37
def make_scenarios(vfs_factory, transport_server, transport_readonly_server,
90
91
# This will always add scenarios using the smart server.
91
from bzrlib.smart.server import (
92
ReadonlySmartTCPServer_for_testing,
93
ReadonlySmartTCPServer_for_testing_v2_only,
94
SmartTCPServer_for_testing,
95
SmartTCPServer_for_testing_v2_only,
97
92
from bzrlib.remote import RemoteBzrDirFormat
98
93
# test the remote server behaviour when backed with a MemoryTransport
99
94
# Once for the current version
100
95
scenarios.extend(make_scenarios(
102
SmartTCPServer_for_testing,
103
ReadonlySmartTCPServer_for_testing,
97
test_server.SmartTCPServer_for_testing,
98
test_server.ReadonlySmartTCPServer_for_testing,
104
99
[(RemoteBzrDirFormat())],
105
100
name_suffix='-default'))
106
101
# And once with < 1.6 - the 'v2' protocol.
107
102
scenarios.extend(make_scenarios(
109
SmartTCPServer_for_testing_v2_only,
110
ReadonlySmartTCPServer_for_testing_v2_only,
104
test_server.SmartTCPServer_for_testing_v2_only,
105
test_server.ReadonlySmartTCPServer_for_testing_v2_only,
111
106
[(RemoteBzrDirFormat())],
112
107
name_suffix='-v2'))
113
108
# add the tests for the sub modules