Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracker] Controller Unit Tests #119

Open
10 of 24 tasks
BrenekH opened this issue Sep 26, 2021 · 0 comments
Open
10 of 24 tasks

[Tracker] Controller Unit Tests #119

BrenekH opened this issue Sep 26, 2021 · 0 comments

Comments

@BrenekH
Copy link
Owner

BrenekH commented Sep 26, 2021

Purpose

This issue is for tracking the progress of writing unit tests for the Controller, which is mostly taking place on the controller-unit-tests branch.

Contributions

I'm happy to take pull requests which helps further this issue along, but be aware that I may request changes to better fit the project as I would any other PR.

Some important things to keep in mind:

  • Dependencies must be mocked (dependencies in this case simply means anything that is not easily controllable in a test)
    • Rewriting existing Controller code to support the mocking of dependencies is perfectly acceptable and in fact highly encouraged.
  • Tests should be independent of one another. This means that shared structs should not be used and instead a new one should be allocated for each test.

Coverage

Total Coverage: 68.7%

  • jobhealth
    • job_health.go - 100.0%
    • mock.go - 80.0%
    • structs.go - 0.0%
  • library
    • commanddecider
      • cmd_decider.go - 97.4%
    • cache.go - 96.3%
    • file_discovery.go - 45.8%
    • manager.go - 0.0%
  • settings
    • mock.go - 92.9%
    • settings.go - 46.2%
  • sqlite
    • database.go - 0.0%
    • file_cache.go - 0.0%
    • health_checker - 14.8%
    • library_manager - 0.0%
    • runner_comm.go - 0.0%
    • user_interfacer.go - 0.0%
  • mocks.go - 100.0%
  • run.go - 96.7%
  • structs.go - 0.0%
  • util.go - 100.0%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant