Skip to content

test: add coverage for mql/errors/types/utils/health (currently zero) #204

@Lutherwaves

Description

@Lutherwaves

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Several packages have zero test coverage, so regressions in them are invisible:

  • mql/ (expr.go, parser.go) — no tests, and it currently has real correctness bugs (see the wildcard/IN issue). Highest priority.
  • errors/errors.go — no tests for StatusCode() / Error() across the error types.
  • types/types.go — no tests for GetOpenAPIDefinitions / MergeOpenAPIDefinitions.
  • utils/utils.go — no tests for NewId() / id conversion.
  • health/health.go — no tests for storage + dependency check paths.

Desired Solution you'd like

Add focused unit tests for each package above. Suggested order by value:

  1. mql/ — parser edge cases (empty input, unmatched parens, empty lists, escaped quotes) and expr evaluation (AND/OR/NOT/group, all operators, wildcard segments, IN case sensitivity). This also locks in the fix for the wildcard/IN bug.
  2. errors/ — table test asserting each type's status code and message.
  3. health/, types/, utils/ — happy path + error/edge cases.

Additional Context

Found during a general audit of the library. Marked good first issue — each package is small and self-contained, ideal for newcomers. The mql/ portion is best paired with the wildcard bug fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    goPull requests that update go codegood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions