Skip to content

Add unit tests for all controllers #702

Description

@osvaldoandrade

Test all 15 HTTP controllers individually.

Current coverage:

  • Only batch_controllers_test.go (568 LOC)

Goal:

  • Unit test per controller

Implementation:

  • Create test files:
    • create_task_controller_test.go
    • claim_task_controller_test.go
    • submit_result_controller_test.go
    • heartbeat_controller_test.go
    • etc. (15 total)
  • Use table-driven tests
  • Mock application layer (simple fakes)

Acceptance criteria:

  • Each controller has dedicated test file
  • Coverage ≥90% on controllers
  • Tests isolated (no external dependencies)

Part of: #654
Requires: #649 (controllers regrouped), #654 (testutil/wait)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions