Skip to content
Snippets Groups Projects
Commit dccc245a authored by David Douard's avatar David Douard
Browse files

Ensure the vault instance used in tests is recreated

otherwise XXX
parent 9d2a46ed
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import yaml
from swh.core.api.serializers import json_dumps, msgpack_dumps, msgpack_loads
from swh.vault.api.serializers import ENCODERS
import swh.vault.api.server
from swh.vault.api.server import (
VaultServerApp,
check_config,
......@@ -63,6 +64,9 @@ def async_app(swh_local_vault_config: Dict[str, Any],) -> VaultServerApp:
Note: This requires the db setup to run (fixture swh_vault in charge of this)
"""
# make sure a new VaultBackend is instantiated for each test to prevent
# side effects between tests
swh.vault.api.server.vault = None
return make_app(swh_local_vault_config)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment