Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set EDXAPP_TEST_MONGO_HOST=mongodb in openedx-dev #1083

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/20240624_105125_kyle_test_mongo_host.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Improvement] Set `EDXAPP_TEST_MONGO_HOST` env var in the openedx-dev image so that it no longer needs to be set by hand when running edx-platform unit tests (by @kdmccormick).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a changelog entry for this, considering this is only meant for dev/testing and wont impact the operators as such?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Tutor is both an operator tool and a developer tool, I think it is good to make not of the improvements we make for developers too.

1 change: 0 additions & 1 deletion docs/tutorials/edx-platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ Then, run unit tests with ``pytest`` commands::
# Run tests on common apps
unset DJANGO_SETTINGS_MODULE
unset SERVICE_VARIANT
export EDXAPP_TEST_MONGO_HOST=mongodb
pytest common
pytest openedx
pytest xmodule
Expand Down
4 changes: 4 additions & 0 deletions tutor/templates/build/openedx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ RUN pip install -e "/mnt/{{ name }}"
# Add ipdb as default PYTHONBREAKPOINT
ENV PYTHONBREAKPOINT=ipdb.set_trace

# Point unit tests at the MongoDB container
ENV EDXAPP_TEST_MONGO_HOST={{ MONGODB_HOST }}
ENV EDXAPP_TEST_MONGO_PORT_NUM={{ MONGODB_PORT }}

# Recompile static assets: in development mode all static assets are stored in edx-platform,
# and the location of these files is stored in webpack-stats.json. If we don't recompile
# static assets, then production assets will be served instead.
Expand Down
Loading