54
54
vfs_transport_factory=None):
55
55
"""Transform the input formats to a list of scenarios.
57
:param formats: A list of (scenario_name_suffix, repo_format, bzrdir_format)
58
where the scenario_info is a dict that controls the test.
57
:param formats: A list of (scenario_name_suffix, repo_format)
58
where the scenario_name_suffix is to be appended to the format
59
name, and the repo_format is a RepositoryFormat subclass
61
:returns: Scenarios of [(scenario_name, {parameter_name: value})]
61
for scenario_name_suffix, repository_format, bzrdir_format in formats:
64
for scenario_name_suffix, repository_format in formats:
62
65
scenario_name = repository_format.__class__.__name__
63
66
scenario_name += scenario_name_suffix
64
67
scenario = (scenario_name,
65
68
{"transport_server":transport_server,
66
69
"transport_readonly_server":transport_readonly_server,
67
"bzrdir_format":bzrdir_format,
70
"bzrdir_format":repository_format._matchingbzrdir,
68
71
"repository_format":repository_format,
70
73
# Only override the test's vfs_transport_factory if one was
84
87
# format_scenarios is all the implementations of Repository; i.e. all disk
85
88
# formats plus RemoteRepository.
86
89
format_scenarios = formats_to_scenarios(
87
[('', format, format._matchingbzrdir) for format in all_formats],
90
[('', format) for format in all_formats],
89
92
# None here will cause a readonly decorator to be created
90
93
# by the TestCaseWithTransport.get_readonly_transport method.
92
95
format_scenarios.extend(formats_to_scenarios(
93
[('-default', RemoteRepositoryFormat(), RemoteBzrDirFormat())],
96
[('-default', RemoteRepositoryFormat())],
94
97
SmartTCPServer_for_testing,
95
98
ReadonlySmartTCPServer_for_testing,
97
100
format_scenarios.extend(formats_to_scenarios(
98
[('-v2', RemoteRepositoryFormat(), RemoteBzrDirFormat())],
101
[('-v2', RemoteRepositoryFormat())],
99
102
SmartTCPServer_for_testing_v2_only,
100
103
ReadonlySmartTCPServer_for_testing_v2_only,