Skip to content

Conversation

kevalmahajan
Copy link
Member

🐛 Bug-fix PR


📌 Summary

Closes #810
Previously, test cases were unintentionally using the production (or main) database configured in the .env file. As a result, test data including tools created during tests were being written to the main DB, causing data pollution and potentially impacting the integrity of production data.

💡 Fix Description

  1. All test cases now use an in-memory (mock) database, isolated from the production environment.
  2. Test data is ephemeral and discarded after each test run, maintaining a clean state.
  3. The .env configuration for the production database is no longer referenced during test execution.
  4. Tools and other entities created during testing are now invisible in the UI or any environment tied to the main DB.

Testing 🛠️

  1. Run make test.
  2. Confirm that no tools are created in your main database (as configured in .env).
  3. Run make serve and open the UI.
  4. Ensure that no new tools appear in the UI as a result of running the test cases.

🧪 Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage ≥ 90 % make coverage
Manual regression no longer fails steps / screenshots

📐 MCP Compliance (if relevant)

  • Matches current MCP spec
  • No breaking change to MCP clients

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

MohanLaksh and others added 2 commits August 22, 2025 10:18
* fixing minor UI visiblity issues

Signed-off-by: Mohan Lakshmaiah <[email protected]>

* Fix file permissions and encoding headers

- Make hybrid_server.py and rest_server.py executable
- Add UTF-8 encoding headers as required by pre-commit hooks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>

---------

Signed-off-by: Mohan Lakshmaiah <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Co-authored-by: Mohan Lakshmaiah <[email protected]>
Co-authored-by: Mihai Criveti <[email protected]>
Co-authored-by: Claude <[email protected]>
@kevalmahajan
Copy link
Member Author

Wrong PR, closing it as the new PR is raised for this issue : PR #824

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Ensure Test Cases Use Mock Database instead of Main DB
2 participants