mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
add GridTestMixin.set_up_grid(oneshare=True)
This configures client[0] to use k=N=1, which is a lot faster for tests that don't care about the actual shares (e.g. most of the CLI tests).
This commit is contained in:
parent
e431faf58c
commit
50df45e3a0
@ -360,13 +360,18 @@ class GridTestMixin:
|
||||
return self.s.stopService()
|
||||
|
||||
def set_up_grid(self, num_clients=1, num_servers=10,
|
||||
client_config_hooks={}):
|
||||
client_config_hooks={}, oneshare=False):
|
||||
# self.basedir must be set
|
||||
self.g = NoNetworkGrid(self.basedir,
|
||||
num_clients=num_clients,
|
||||
num_servers=num_servers,
|
||||
client_config_hooks=client_config_hooks)
|
||||
self.g.setServiceParent(self.s)
|
||||
if oneshare:
|
||||
c = self.get_client(0)
|
||||
c.encoding_params["k"] = 1
|
||||
c.encoding_params["happy"] = 1
|
||||
c.encoding_params["n"] = 1
|
||||
self._record_webports_and_baseurls()
|
||||
|
||||
def _record_webports_and_baseurls(self):
|
||||
|
Loading…
Reference in New Issue
Block a user