Skip to content

chore: unit tests for runtime registry and RuntimeInfo error handling#3168

Open
Goku2099 wants to merge 2 commits intokubeflow:masterfrom
Goku2099:test/runtime-core-coverage
Open

chore: unit tests for runtime registry and RuntimeInfo error handling#3168
Goku2099 wants to merge 2 commits intokubeflow:masterfrom
Goku2099:test/runtime-core-coverage

Conversation

@Goku2099
Copy link
Contributor

@Goku2099 Goku2099 commented Feb 3, 2026

This PR adds a couple of focused unit tests in the runtime core package.

  1. Added unit tests for 'NewRuntimeRegistry' to verify runtime registration and dependency wiring.
  2. Added a small unit test for 'TrainingRuntime.RuntimeInfo' to cover the unsupported 'runtimeTemplateSpec' error path.

Why this change

While looking at test coverage in 'pkg/runtime/core', I noticed that:

  • 'registry.go' did not have direct unit test coverage.
  • The error-handling branch in 'RuntimeInfo' was not exercised by existing tests, which mostly cover happy paths.

These tests aim to cover those gaps without touching production code or adding integration complexity.

Scope

  • Test-only changes
  • No behavior changes
  • No production code modifications

related: #3152

Verification

go test ./pkg/runtime/core/...

Signed-off-by: Sameer_yadav <159073326+Goku2099@users.noreply.github.com>
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign gaocegege for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Goku2099 Goku2099 changed the title add: unit tests for runtime registry and RuntimeInfo error handling chore: unit tests for runtime registry and RuntimeInfo error handling Feb 3, 2026
@coveralls
Copy link

coveralls commented Feb 3, 2026

Pull Request Test Coverage Report for Build 21643569736

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 51.754%

Totals Coverage Status
Change from base Build 21610377640: 0.5%
Covered Lines: 1254
Relevant Lines: 2423

💛 - Coveralls

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments