inbox-zero
inbox-zero copied to clipboard
Add .env.test for web app tests
Summary
- add apps/web/.env.test with safe placeholder variables for automated tests
- align test env defaults with local LM Studio-compatible OpenAI settings
- remove temporary PR draft file from repo
Testing
- pnpm test
- docker build -t inbox-zero -f docker/Dockerfile.prod .
- docker run --rm --name inbox-zero-test -p 3000:3000 -e DATABASE_URL=postgresql://postgres:password@localhost:5432/inboxzero?schema=public -e AUTH_SECRET=dummy -e GOOGLE_CLIENT_ID=dummy -e GOOGLE_CLIENT_SECRET=dummy -e EMAIL_ENCRYPT_SECRET=dummysecret -e EMAIL_ENCRYPT_SALT=dummysalt -e GOOGLE_PUBSUB_TOPIC_NAME=projects/test/topics/test -e INTERNAL_API_KEY=dummy inbox-zero
Summary by CodeRabbit
-
Tests
- Added standardized environment configuration for the test environment to ensure consistent setup across runs.
- Improves reliability and reproducibility of automated and local testing.
-
Chores
- Introduced consolidated test-only environment variables to streamline configuration management.
- No user-facing changes; application behavior remains unchanged outside of test contexts.
Someone is attempting to deploy a commit to the Inbox Zero OSS Program Team on Vercel.
A member of the Team first needs to authorize it.
Walkthrough
Adds a new test environment configuration file for the web app, defining environment variables for runtime mode, database URLs, OAuth credentials, LLM/OpenAI settings, Pub/Sub topics, encryption secrets, internal API keys, base URLs, and model selections. No code or behavior changes.
Changes
| Cohort / File(s) | Summary |
|---|---|
Test environment configurationapps/web/.env.test |
Introduces test-only environment variables: runtime flags, PostgreSQL URLs, service base URLs, OAuth (Google/Microsoft) credentials, OpenAI/LLM configs, Pub/Sub topics, encryption secrets, internal API keys, and model selections. No application code modified. |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
I sniff the vars in twilight’s hush,
Keys and secrets in a tidy rush.
Test burrows mapped, no code to bend—
Just tunnels labeled end to end.
A hop, a nod, configs aligned—
Now every carrot’s easy to find. 🥕✨
Pre-merge checks and finishing touches
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title Check | ✅ Passed | The pull request title clearly and concisely summarizes the main change, which is adding the .env.test configuration file for the web application’s test environment, making it immediately understandable to reviewers. |
| Docstring Coverage | ✅ Passed | No functions found in the changes. Docstring coverage check skipped. |
✨ Finishing touches
🧪 Generate unit tests
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
robertKim seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.
In case there are security findings, they will be communicated to you as a comment inside the PR.
Hope you’ll enjoy using Jit.
Questions? Comments? Want to learn more? Get in touch with us.
This file is part of gitignore atm
We could make it .env.test.example so people can add what they want to their own test files without it being committed