File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -139,12 +139,16 @@ jobs:
139139 - name : Run backend tests with coverage
140140 env :
141141 BACKEND_BASE_URL : https://127.0.0.1:443
142- # Provide an explicit Mongo URI for tests using the CI secrets and modern auth mechanism
143- MONGODB_URL : mongodb://${{ secrets.MONGO_ROOT_USER }}:${{ secrets.MONGO_ROOT_PASSWORD }}@127.0.0.1:27017/?authSource=admin&authMechanism=SCRAM-SHA-256
142+ # Pass credentials separately to let Python handle URL encoding
143+ MONGO_ROOT_USER : ${{ secrets.MONGO_ROOT_USER }}
144+ MONGO_ROOT_PASSWORD : ${{ secrets.MONGO_ROOT_PASSWORD }}
145+ MONGODB_HOST : 127.0.0.1
146+ MONGODB_PORT : 27017
147+ # Don't set MONGODB_URL here - let conftest.py construct it with proper encoding
144148 run : |
145149 cd backend
146150 echo "Using BACKEND_BASE_URL=$BACKEND_BASE_URL"
147- # Do not echo the full MONGODB_URL to avoid leaking secrets
151+ echo "MongoDB connection will use host: 127.0.0.1:27017"
148152 python -m pytest tests/integration tests/unit -v --cov=app --cov-branch --cov-report=xml --cov-report=term --cov-report=term-missing
149153
150154 - name : Upload coverage to Codecov
You can’t perform that action at this time.
0 commit comments