Skip to content

test: improve code coverage across packages #21

Description

@sunba91-su

Description

Increase test coverage to ensure reliability and catch regressions. Current baseline measured from CI runs.

Current Coverage

Package Coverage Target
internal/commands 74.4% 80%+
internal/convstate 97.6% 95%+ (maintain)
internal/store 43.0% 70%+
internal/config No tests 50%+
internal/rocket No tests 50%+

Acceptance Criteria

  • internal/config — test config loading, env var parsing, error cases
  • internal/store — test edge cases (empty DB, concurrent access, missing sessions)
  • internal/commands — test remaining command handlers, permission checks
  • internal/rocket — mock WebSocket/REST for client unit tests (or document why untestable)
  • Overall project coverage >= 65%
  • Coverage report added to CI (optional: re-enable -cover flag once covdata issue is resolved)

Notes

  • -cover flag removed from CI due to covdata conflict with -race on Go 1.22 runner; coverage must be verified locally until a fix is available
  • Focus on meaningful tests (edge cases, error paths), not just LOCs covered

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions