fix(backend): remove test controllers from production module and add registration guard - #1473
egwujiohaifesinachiperpetual-max wants to merge 5 commits into
Conversation
…registration guard
…e-test-controllers fix(backend): remove test controllers from production module and add …
|
@egwujiohaifesinachiperpetual-max Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@egwujiohaifesinachiperpetual-max Kindly resolve conflicts |
|
Hi @egwujiohaifesinachiperpetual-max — thanks for this contribution. CI is currently failing on this pull request, so it can't be reviewed or merged yet. Failing check:
Could you take a look and push a fix? To reproduce locally:
A couple of things that come up often: make sure your branch is rebased on the latest If the failure looks unrelated to your change, say so in a comment and we'll investigate the workflow instead of asking you to fix it. Push a new commit and CI will re-run automatically. |
Closes #1416
Description
Removes
TestControllerandTestExceptionControllerfromAppModuleto eliminate unnecessary attack surface in production environments. Production sentiment endpoints (/sentiment/analyzeand/sentiment/health) have been cleanly extracted into a dedicatedSentimentControllerinSentimentModule.Changes Included
TestControllerandTestExceptionControllerfromapps/backend/src/app.module.tsand deleted test controller files.SentimentControllerregistered inSentimentModulefor production sentiment analysis routes.app.module.spec.tsasserting that no controller namedtest*(case-insensitive) can be registered inAppModule.global-exception.filter.spec.tscoveringBAD_REQUESTexceptions, genericErrorhandling in development mode, and unknown exception objects.app.e2e-spec.tsto confirm/test/*and/test-exception/*paths return 404.Acceptance Criteria Checklist
TestExceptionControlleris removed from the production module.TestControlleris removed from the production module and provably unreachable.test*from being registered inapp.module.ts.