Skip to content

Commit

Permalink
Merge pull request #688 from maykinmedia/feature/208-refactor-docker-…
Browse files Browse the repository at this point in the history
…decorator

[#208] Improve docker reload fixture decorator
  • Loading branch information
SilviaAmAm authored Feb 13, 2025
2 parents fd8c6b6 + 5f31f50 commit 9c9bfb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion backend/docs/developers/vcr-tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ To do this, stop the Docker deamon and restart it as follows (more info https://
Then the client will be configured using `client = docker.DockerClient(base_url='tcp://127.0.0.1:2375')` instead of
`client = docker.from_env()`.
`client = docker.from_env()`.

Environment variables
=====================

- ``RECORDING_CASSETTES_VCR``: Defaults to ``False``. Set this to ``True`` if you are re-recording the cassettes.
2 changes: 2 additions & 0 deletions backend/src/openarchiefbeheer/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@

WAITING_PERIOD = config("WAITING_PERIOD", 7)

RECORDING_CASSETTES_VCR = config("RECORDING_CASSETTES_VCR", False)

##############################
# #
# 3RD PARTY LIBRARY SETTINGS #
Expand Down
2 changes: 1 addition & 1 deletion backend/src/openarchiefbeheer/utils/utils_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def decorator(func):
sudo dockerd -H unix:///var/run/docker.sock -H tcp://127.0.0.1:2375
```
"""
if settings.ENVIRONMENT == "CI":
if not settings.RECORDING_CASSETTES_VCR:
return func

try:
Expand Down

0 comments on commit 9c9bfb4

Please sign in to comment.