File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,26 +202,17 @@ def resources_dir() -> Path:
202202 return RESOURCES_DIR
203203
204204
205- @pytest .fixture (scope = 'session' , autouse = True )
206- def _binding_data_dir () -> Generator [None , None , None ]:
207- """Provide a fresh ``.binding-data/`` for the localbinding component"""
208- shutil .rmtree (BINDING_DATA_DIR , ignore_errors = True )
209- BINDING_DATA_DIR .mkdir (parents = True , exist_ok = True )
210- try :
211- yield
212- finally :
213- shutil .rmtree (BINDING_DATA_DIR , ignore_errors = True )
214-
215-
216205@pytest .fixture (scope = 'session' , autouse = True )
217206def crypto_keys () -> Generator [Path , None , None ]:
218207 """Generate temporary RSA + AES keys for ``cryptostore.yaml``.
219208
220209 Note: autouse is necessary because all sidecars load the entire resources/ folder, regardless
221210 of which components they actually test.
222211 """
223- write_test_keys (CRYPTO_KEYS_DIR )
224212 try :
213+ write_test_keys (CRYPTO_KEYS_DIR )
225214 yield CRYPTO_KEYS_DIR
215+ except Exception as exc :
216+ raise RuntimeError ('Crypto keys failed to generate dynamically, cannot continue testing' ) from exc
226217 finally :
227218 remove_test_keys (CRYPTO_KEYS_DIR )
You can’t perform that action at this time.
0 commit comments