Skip to content

Split large controller test files for maintainability #234

@Defilan

Description

@Defilan

Context

Several test files have grown large enough to impact navigability for new contributors:

File Lines Concern
internal/controller/inferenceservice_controller_test.go 2,587 Primary candidate
pkg/cli/benchmark_test.go 1,786 Large but focused
pkg/cli/cache_inspect_test.go 1,131 Large but focused
internal/controller/model_controller_test.go 912 Borderline

Proposed Approach

For inferenceservice_controller_test.go, split by functionality:

  • inferenceservice_reconcile_test.go — core reconciliation tests
  • inferenceservice_deployment_test.go — deployment construction tests
  • inferenceservice_storage_test.go — storage config tests (cached, emptyDir, PVC)
  • inferenceservice_service_test.go — service construction tests
  • inferenceservice_scheduling_test.go — GPU queue / priority tests

All files stay in the controller package and use the same suite_test.go setup.

Priority

Low — code works fine, this is purely for contributor experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good-first-issueGood for newcomerstech-debtTechnical debt and code cleanuptestingTest infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions