Recent Test & Environment Issues

Monish Komalkumar

New member
Hi maintainers,

I’ve been contributing to talawa-api for a while and previously had no issues running Docker or the full test suite.

Recently, I completely removed the Docker setup (pruned everything), pulled the latest upstream changes, rebuilt containers, and reinstalled all dependencies. Even then, I’ve been facing consistent test failures.

Problem 1:

Environment Schema Failures (Vitest)​

All metrics-related env schema tests are failing with errors like:
env must have required property 'API_FRONTEND_URL'
env must have required property 'API_POSTGRES_HOST'
...
(30+ required properties)

Problem 2:
GraphQL Plugin Timeout
Several integration tests fail with:

FastifyError: Plugin did not start in time: 'graphql-auto-*'

Screenshot 2026-02-15 202151.webp

What must be done in order to fix these issues?
Has there been a recent change in envConfigSchema behavior?
Is there a new required test environment configuration that I might be missing?

just need guidance on whether this is a configuration issue on my side or a recent structural change.
Thanks!
 
Inside createServer.ts, increase pluginTimeout to 40k or 50k.
To fix the env schema failure, try recreating the .env file using this command pnpm tsx setup.ts
 
Last edited:
I tried to increase the pluginTimeout to 50k and ran the pnpm tsx setup.ts command but still did not address the issue I was facing.
Made a separate helper to inject env and modified the createServer.ts to check for passed vars but still does not seem to work.
 
Back
Top