test(v2/driver): add test coverage for cache, validation, and helpers#12935
test(v2/driver): add test coverage for cache, validation, and helpers#12935jsonmp-k8 wants to merge 2 commits intokubeflow:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
🎉 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. |
There was a problem hiding this comment.
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 mockcacheutils.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 🤖
a60bc00 to
ec9fbd5
Compare
…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>
ec9fbd5 to
091f56b
Compare
|
/ok-to-test |
Signed-off-by: Jaison Paul <paul.jaison@gmail.com>
Summary
backend/src/v2/driverpackage from 29.8% to 36.7% by adding 58 new test cases targeting previously untested functionsgetFingerPrint,getFingerPrintsAndID,createCache) with a mockcacheutils.ClientvalidateContainer,validateDAG,validateRootDAG,validateNonRootinputParamConstant,inputParamComponent,inputParamTaskOutput,getItems)provisionOutputsandInferIndexedTaskNameTest plan
go test -v -cover ./backend/src/v2/driver/...