Changeset 347d11a in trunk
- Timestamp:
- 2022-12-02T08:27:13Z (3 years ago)
- Branches:
- master
- Children:
- 22a7aac
- Parents:
- 5bc91bb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/allmydata/test/test_storage_client.py ¶
r5bc91bb r347d11a 78 78 SameProcessStreamEndpointAssigner, 79 79 MemoryIntroducerClient, 80 flush_logged_errors, 80 81 ) 81 82 from .common_web import ( … … 93 94 NativeStorageServer, 94 95 StorageFarmBroker, 96 StorageClientConfig, 97 MissingPlugin, 95 98 _FoolscapStorage, 96 99 _NullStorage, … … 160 163 161 164 162 class UnrecognizedAnnouncement( SyncTestCase):165 class UnrecognizedAnnouncement(unittest.TestCase): 163 166 """ 164 167 Tests for handling of announcements that aren't recognized and don't use … … 184 187 return Service() 185 188 186 def native_storage_server(self ):189 def native_storage_server(self, config=None): 187 190 """ 188 191 Make a ``NativeStorageServer`` out of an unrecognizable announcement. … … 193 196 self._tub_maker, 194 197 {}, 195 EMPTY_CLIENT_CONFIG, 198 node_config=EMPTY_CLIENT_CONFIG, 199 config=config or StorageClientConfig(), 196 200 ) 197 201 … … 244 248 ``NativeStorageServer.get_longname`` describes the missing plugin. 245 249 """ 246 server = self.native_storage_server() 247 self.assertThat( 250 server = self.native_storage_server( 251 StorageClientConfig( 252 storage_plugins={ 253 "nothing": {} 254 } 255 ) 256 ) 257 self.assertEqual( 248 258 server.get_longname(), 249 Equals('<missing plugin "{}">'.format(self.plugin_name)), 250 ) 259 '<missing plugin "nothing">', 260 ) 261 self.flushLoggedErrors(MissingPlugin) 251 262 252 263
Note: See TracChangeset
for help on using the changeset viewer.