Skip to content

Commit

Permalink
Use OVERRIDE as environment variable prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjwadams committed Jan 28, 2025
1 parent 70ef345 commit 8b69011
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
# FIXME: Why is it necessary to set FLASK_ENV to TESTING here when
# pytest runs off GHA usually set this properly?
run: >
docker run --network host -e FLASK_ENV=TESTING -e REDIS_HOST=localhost
-e REDIS_URL=redis://localhost:6379/8 --rm -u root glider-dac-build bash -c
docker run --network host -e FLASK_ENV=TESTING
-e OVERRIDE_REDIS_HOST=localhost -e OVERRIDE_REDIS_URL=redis://localhost:6379/8
--rm -u root glider-dac-build bash -c
"pip install --no-cache -r /glider-dac/test_requirements.txt &&
pytest /glider-dac/glider_dac/tests"
2 changes: 1 addition & 1 deletion glider_dac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create_app():
# this is mainly for test runners which may not be using the containerized versions
# of Redis
# TODO: Move elsewhere, perhaps in config module?
app.config.from_prefixed_env("REDIS")
app.config.from_prefixed_env("OVERRIDE")
app.config["SESSION_TYPE"] = "redis"
app.config["SESSION_REDIS"] = redis.from_url(app.config["REDIS_URL"])
app.json_encoder = LazyJSONEncoder
Expand Down

0 comments on commit 8b69011

Please sign in to comment.