Skip to content

[Backend] Add unit tests for HealthController #1413

Closed

Description

@BigBen-7

Found in a repository audit of main (b472e6b). The facts below were checked against that commit.

Problem

Backend/src/health/health.controller.ts has no spec (0% coverage). It decides between ok and degraded from the database and PostGIS checks.

Fix

Mock the DataSource and test: both checks pass, database fails, PostGIS fails, both fail, and that the error message is surfaced.

Acceptance criteria

  • health.controller.spec.ts exists
  • All four outcomes are asserted

Notes

Scope: Light (about half a day or less). Location: Backend/src/health/.

Activity

  1. ravimahatonp commented on Oct 14, 2026

    @ravimahatonp

    Hello team,

    I examined the issue "[Backend] Add unit tests for HealthController" in PinSpace-Org/GistPin and would be glad to implement the required changes.

    Technical Implementation Outline:

    1. Audit route handlers, DTO validation schemas, and database transaction boundaries.
    2. Implement resilient controller/service logic with idempotency and typed error handling.
    3. Add comprehensive API unit and integration tests.
    4. Verify database queries and schema integrity remain optimal.

    Please assign this issue to me. I will submit a clean, well-tested, and production-ready PR promptly!

  2. ismailoni commented on Oct 15, 2026

    @ismailoni

    @ismailoni has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    After reviewing the requirements, I’m confident in a solution that meets the expected design and satisfies the acceptance criteria.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @ismailoni to this issue.

  3. beebah30 commented on Oct 15, 2026

    @beebah30

    @beebah30 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maintainer, I’ve gone through the issue and its requirements in detail. I believe I have the skills and time needed to work on it and would be glad to contribute a reliable solution. Kindly consider assigning this task to me

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @beebah30 to this issue.

  4. cartel9072-design commented on Oct 15, 2026

    @cartel9072-design

    @cartel9072-design has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    I can work on this issue perfectly, kindly assign to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @cartel9072-design to this issue.

  5. demilade18-git commented on Oct 15, 2026

    @demilade18-git
    Contributor

    @demilade18-git has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi, I'd like to take this on.

    I'm a full-stack developer with solid experience in modern JavaScript/TypeScript, REST APIs, and frontend frameworks like React. I enjoy working in open source and following existing project conventions.

    I've gone through the details of this issue and I'm confident I can deliver a clean, well-tested solution that fits the codebase.

    I'd appreciate being assigned to this issue and look forward to contributing.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @demilade18-git to this issue.

  6. Hardex005 commented on Oct 15, 2026

    @Hardex005

    @Hardex005 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi, I’m interested in working on this issue. I’ve gone through the requirements and believe I can deliver a solution that aligns with the project’s expectations.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Hardex005 to this issue.

  7. sweetgirl8523 commented on Oct 15, 2026

    @sweetgirl8523

    @sweetgirl8523 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello Maintainer, I will like to improve health-check reliability by adding unit tests with a mocked DataSource, covering all four database and PostGIS outcomes and error-message handling. Thank you for considering me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @sweetgirl8523 to this issue.

  8. jayfuckingstyles-dotcom commented on Oct 15, 2026

    @jayfuckingstyles-dotcom

    @jayfuckingstyles-dotcom has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi guys am interested in this issue

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @jayfuckingstyles-dotcom to this issue.

  9. Olaife-04 commented on Oct 15, 2026

    @Olaife-04

    @Olaife-04 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    This is a well-scoped issue for me to tackle. I'll start by writing a failing test to confirm the bug, then work on the fix. Let me know if that approach sounds good.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Olaife-04 to this issue.

  10. drips-wave commented on Oct 15, 2026

    @drips-wave

    Congratulations, @demilade18-git! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @demilade18-git: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  11. grantfox-oss commented on Oct 15, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @demilade18-git's PR #1518 was approved and merged by @BigBen-7.

    🏆 @demilade18-git: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,948 total points). Track your full progress on GrantFox.

    👏 Great work, @demilade18-git! Keep contributing to PinSpace-Org.

  12. drips-wave commented on Oct 15, 2026

    @drips-wave

    This issue has been completed by @demilade18-git as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @demilade18-git: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions