Skip to content

Increase code coverage to 95% #158

@GrayFlash

Description

@GrayFlash

Is your feature request related to a problem? Please describe.
We could aim for higher code coverage of 95% for the compass.

Describe the solution you'd like
To achieve it we need to work on hitting all the statements where the error is being caught, and it should help us understand and debug our code in case an unexpected behavior is noticed.

Additional context

  • core package (overall coverage - 94.75%):
    • core/asset/patch.go - 89.8%
    • core/star - no test files
    • core/tag - few test cases where error handling can be hit.
    • core/user - mostly seems good, opts can be checked in service.go file for func NewService()
    • core/validator - 3 error conditions can be hit
  • internal package (overall coverage 84.41%):
    • internal/client - no test files for client.go
    • internal/server/health - 100% coverage
    • internal/server/v1beta1 - 84.33%
    • internal/store/elasticsearch - discovery_repository, discovery_search_repository and es.go files need more coverage on error handling.
    • internal/store/postgres - more coverage for error handling
  • pkg package (overall coverage 87.88%):
    • pkg/statsd - has no test files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersrefactorupdates codebase without any feature addition or bug fixes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions