Fix 404 errors when running tests with NODE_ENV=test

production_safety_test.js requires tests to run with NODE_ENV set to
`test`. The /test endpoint was previously only enabled with NODE_ENV set
to `development` which results in the api3 security tests failing with 404
errors. Instead, enable it for NODE_ENV set to `test`.
This commit is contained in:
Brandon Nielsen
2026-03-26 21:01:56 -05:00
parent 6b59dfc5a6
commit 59a531db16
+1 -1
View File
@@ -77,7 +77,7 @@ function configure (env, ctx) {
app.get('/version', require('./specific/version')(app, ctx, env)); app.get('/version', require('./specific/version')(app, ctx, env));
if (app.get('env') === 'development' || app.get('ci')) { // for development and testing purposes only if (app.get('env') === 'test' || app.get('ci')) { // for development and testing purposes only
app.get('/test', async function test (req, res) { app.get('/test', async function test (req, res) {
try { try {