Merge branch '3899.failed-server' of github.com:meejah/tahoe-lafs into 3899.failed-server

This commit is contained in:
meejah 2023-08-11 21:18:10 -06:00
commit b751a3937a
2 changed files with 7 additions and 7 deletions

View File

@ -187,10 +187,10 @@ class StorageClientConfig(object):
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
to instances for all available plugins
:returns: a mapping from names to instances for all available
plugins
:raises MissingPlugin: if the configuration asks for a plugin
for which there is no corresponding instance (e.g. it is

View File

@ -186,7 +186,7 @@ class UnrecognizedAnnouncement(unittest.TestCase):
def _tub_maker(self, overrides):
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.
"""
@ -196,7 +196,7 @@ class UnrecognizedAnnouncement(unittest.TestCase):
self._tub_maker,
{},
node_config=EMPTY_CLIENT_CONFIG,
config=config or StorageClientConfig(),
config=config if config is not None else StorageClientConfig(),
)
def test_no_exceptions(self):
@ -248,10 +248,10 @@ class UnrecognizedAnnouncement(unittest.TestCase):
An exception is produced if the plugin is missing
"""
with self.assertRaises(MissingPlugin):
_ = self.native_storage_server(
self.native_storage_server(
StorageClientConfig(
storage_plugins={
"nothing": {}
"missing-plugin-name": {}
}
)
)