mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 08:25:35 +00:00
Merge branch '3899.failed-server' of github.com:meejah/tahoe-lafs into 3899.failed-server
This commit is contained in:
commit
b751a3937a
@ -187,10 +187,10 @@ class StorageClientConfig(object):
|
|||||||
grid_manager_keys,
|
grid_manager_keys,
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_configured_storage_plugins(self):
|
def get_configured_storage_plugins(self) -> dict[str, IFoolscapStoragePlugin]:
|
||||||
"""
|
"""
|
||||||
:returns Dict[str, IFoolscapStoragePlugin]: a dict mapping names
|
:returns: a mapping from names to instances for all available
|
||||||
to instances for all available plugins
|
plugins
|
||||||
|
|
||||||
:raises MissingPlugin: if the configuration asks for a plugin
|
:raises MissingPlugin: if the configuration asks for a plugin
|
||||||
for which there is no corresponding instance (e.g. it is
|
for which there is no corresponding instance (e.g. it is
|
||||||
|
@ -186,7 +186,7 @@ class UnrecognizedAnnouncement(unittest.TestCase):
|
|||||||
def _tub_maker(self, overrides):
|
def _tub_maker(self, overrides):
|
||||||
return Service()
|
return Service()
|
||||||
|
|
||||||
def native_storage_server(self, config=None):
|
def native_storage_server(self, config: Optional[StorageClientConfig] = None) -> NativeStorageServer:
|
||||||
"""
|
"""
|
||||||
Make a ``NativeStorageServer`` out of an unrecognizable announcement.
|
Make a ``NativeStorageServer`` out of an unrecognizable announcement.
|
||||||
"""
|
"""
|
||||||
@ -196,7 +196,7 @@ class UnrecognizedAnnouncement(unittest.TestCase):
|
|||||||
self._tub_maker,
|
self._tub_maker,
|
||||||
{},
|
{},
|
||||||
node_config=EMPTY_CLIENT_CONFIG,
|
node_config=EMPTY_CLIENT_CONFIG,
|
||||||
config=config or StorageClientConfig(),
|
config=config if config is not None else StorageClientConfig(),
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_no_exceptions(self):
|
def test_no_exceptions(self):
|
||||||
@ -248,10 +248,10 @@ class UnrecognizedAnnouncement(unittest.TestCase):
|
|||||||
An exception is produced if the plugin is missing
|
An exception is produced if the plugin is missing
|
||||||
"""
|
"""
|
||||||
with self.assertRaises(MissingPlugin):
|
with self.assertRaises(MissingPlugin):
|
||||||
_ = self.native_storage_server(
|
self.native_storage_server(
|
||||||
StorageClientConfig(
|
StorageClientConfig(
|
||||||
storage_plugins={
|
storage_plugins={
|
||||||
"nothing": {}
|
"missing-plugin-name": {}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user