Skip to content

Commit 7e936f9

Browse files
committed
ci: align JWT_SECRET value with conftest expectations
- Change CI .env JWT_SECRET to match conftest.py test secret - Ensures JWT token generation and validation use same secret - Fixes 401 UNAUTHORIZED failures in backend integration tests
1 parent 16458b5 commit 7e936f9

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/ci-quick.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
"RESILIENTDB_BASE_URI=https://crow.resilientdb.com" \
105105
"RES_DB_BASE_URI=https://crow.resilientdb.com" \
106106
"RESILIENTDB_GRAPHQL_URI=https://cloud.resilientdb.com/graphql" \
107-
"JWT_SECRET=test-secret" > .env
107+
"JWT_SECRET=test-secret-key-do-not-use-in-production" > .env
108108
109109
- name: Run backend unit tests only (fast)
110110
# wait for mongodb to be ready on localhost:27017

.github/workflows/ci-tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,12 @@ jobs:
8888
- name: Create .env file
8989
run: |
9090
cd backend
91-
printf '%s\n' \
92-
"MONGO_ATLAS_URI=mongodb://testuser:testpass@localhost:27017/?authSource=admin" \
93-
"REDIS_HOST=localhost" \
94-
"REDIS_PORT=6379" \
95-
"SIGNER_PUBLIC_KEY=${{ steps.gen_keys.outputs.public_key }}" \
96-
"SIGNER_PRIVATE_KEY=${{ steps.gen_keys.outputs.private_key }}" \
97-
"RESILIENTDB_BASE_URI=https://crow.resilientdb.com" \
98-
"RES_DB_BASE_URI=https://crow.resilientdb.com" \
99-
"RESILIENTDB_GRAPHQL_URI=https://cloud.resilientdb.com/graphql" \
100-
"JWT_SECRET=test-secret-key-for-ci" > .env
91+
printf "MONGO_ATLAS_URI=mongodb://localhost:27017/\n\
92+
RESILIENTDB_GRAPHQL_URI=https://cloud.resilientdb.com/graphql\n\
93+
RES_DB_BASE_URI=https://crow.resilientdb.com\n\
94+
SIGNER_PUBLIC_KEY=%s\n\
95+
SIGNER_PRIVATE_KEY=%s\n\
96+
JWT_SECRET=test-secret-key-do-not-use-in-production" > .env
10197
10298
- name: Wait for MongoDB
10399
run: |

0 commit comments

Comments
 (0)