Skip to content

Commit e3da2f6

Browse files
timgrahamaclark4life
authored andcommitted
make atlas tests use encryption settings
1 parent 0317fba commit e3da2f6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/runtests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
else:
2626
test_apps.extend(["gis_tests", "gis_tests_"])
2727

28+
settings_module = os.environ.get("DJANGO_SETTINGS_MODULE", "mongodb_settings")
2829
runtests = pathlib.Path(__file__).parent.resolve() / "runtests.py"
29-
run_tests_cmd = f"python3 {runtests} %s --settings mongodb_settings -v 2"
30+
run_tests_cmd = f"python3 {runtests} %s --settings {settings_module} -v 2"
3031

3132
shouldFail = False
3233
for app_name in test_apps:

.github/workflows/test-python-atlas.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: install django-mongodb-backend
2929
run: |
3030
pip3 install --upgrade pip
31-
pip3 install -e .
31+
pip3 install -e .[encryption]
3232
- name: Checkout Django
3333
uses: actions/checkout@v5
3434
with:
@@ -45,8 +45,8 @@ jobs:
4545
cd django_repo/tests/
4646
pip3 install -e ..
4747
pip3 install -r requirements/py3.txt
48-
- name: Copy the test settings file
49-
run: cp .github/workflows/mongodb_settings.py django_repo/tests/
48+
- name: Copy the test settings files
49+
run: cp .github/workflows/*_settings.py django_repo/tests/
5050
- name: Copy the test runner file
5151
run: cp .github/workflows/runtests.py django_repo/tests/runtests_.py
5252
- name: Start local Atlas
@@ -56,3 +56,5 @@ jobs:
5656
run: python3 django_repo/tests/runtests_.py
5757
permissions:
5858
contents: read
59+
env:
60+
DJANGO_SETTINGS_MODULE: "encrypted_settings"

0 commit comments

Comments
 (0)