Skip to content

test(v2/driver): add test coverage for cache, validation, and helpers#12935

Open
jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
jsonmp-k8:add-driver-test-coverage
Open

test(v2/driver): add test coverage for cache, validation, and helpers#12935
jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
jsonmp-k8:add-driver-test-coverage

Conversation

@jsonmp-k8
Copy link
Contributor

Summary

  • Increase test coverage for the backend/src/v2/driver package from 29.8% to 36.7% by adding 58 new test cases targeting previously untested functions
  • Add tests for cache subsystem (getFingerPrint, getFingerPrintsAndID, createCache) with a mock cacheutils.Client
  • Add validation tests for validateContainer, validateDAG, validateRootDAG, validateNonRoot
  • Add tests for helper functions (inputParamConstant, inputParamComponent, inputParamTaskOutput, getItems)
  • Add tests for provisionOutputs and InferIndexedTaskName

Test plan

  • All 58 new test cases pass with go test -v -cover ./backend/src/v2/driver/...
  • No existing tests broken
  • Coverage verified at 36.7% (up from 29.8%)

Copilot AI review requested due to automatic review settings February 27, 2026 22:27
@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 chensun 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

@github-actions
Copy link

🎉 Welcome to the Kubeflow Pipelines repo! 🎉

Thanks for opening your first PR! We're excited to have you onboard 🚀

Next steps:

Feel free to ask questions in the comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds targeted unit tests to improve coverage in backend/src/v2/driver, focusing on previously untested helper, validation, caching, and resolution logic.

Changes:

  • Added new unit tests for driver validation paths (validateContainer, validateDAG, validateRootDAG, validateNonRoot).
  • Added new unit tests for caching helpers (getFingerPrint, getFingerPrintsAndID, createCache) using a mock cacheutils.Client.
  • Added/extended unit tests for misc helpers (inputParam*, getItems, provisionOutputs, InferIndexedTaskName).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backend/src/v2/driver/util_test.go Adds tests for input-param helper constructors and getItems.
backend/src/v2/driver/root_dag_test.go New tests for validateRootDAG option validation.
backend/src/v2/driver/resolve_test.go Adds tests for InferIndexedTaskName.
backend/src/v2/driver/driver_test.go Adds tests for validateNonRoot and provisionOutputs.
backend/src/v2/driver/dag_test.go New tests for validateDAG option validation.
backend/src/v2/driver/container_test.go New tests for validateContainer option validation.
backend/src/v2/driver/cache_test.go New tests for cache fingerprinting and cache entry creation with a mock client.

🤖 LGTM 🤖

@jsonmp-k8 jsonmp-k8 force-pushed the add-driver-test-coverage branch from a60bc00 to ec9fbd5 Compare February 27, 2026 22:31
…functions

Increase test coverage for the v2/driver package from 29.8% to 36.7% by
adding 58 new test cases targeting previously untested functions:

- util_test.go: inputParamConstant, inputParamComponent,
  inputParamTaskOutput, getItems
- cache_test.go: getFingerPrint, getFingerPrintsAndID, createCache
  (with mock cacheutils.Client)
- container_test.go: validateContainer
- dag_test.go: validateDAG
- root_dag_test.go: validateRootDAG
- driver_test.go: validateNonRoot, provisionOutputs
- resolve_test.go: InferIndexedTaskName

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
@jsonmp-k8 jsonmp-k8 force-pushed the add-driver-test-coverage branch from ec9fbd5 to 091f56b Compare February 27, 2026 22:34
@jsonmp-k8
Copy link
Contributor Author

/ok-to-test

Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants