test(optimizer): add unit tests for OptimizerClient in KubernetesBackend#133
test(optimizer): add unit tests for OptimizerClient in KubernetesBackend#133vrd-cse wants to merge 1 commit intokubeflow:mainfrom
Conversation
This adds comprehensive unit tests for the OptimizerClient methods in KubernetesBackend, mirroring the existing test structure used for TrainerClient in backend_test.py. Tests cover: - get_runtime (success, timeout, runtime error) - list_runtimes - optimize (study creation) - get_study - list_studies - get_study_logs - delete_study All tests use pytest fixtures, mock Kubernetes API calls closes kubeflow#124
|
[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 |
andreyvelich
left a comment
There was a problem hiding this comment.
Thanks for this @vrd-cse!
Please refactor your tests by following tests in Kubeflow Trainer: https://github.com/kubeflow/sdk/blob/main/kubeflow/trainer/backends/kubernetes/backend_test.py
You should have similar tests but for Optimizer: https://github.com/kubeflow/sdk/blob/main/kubeflow/optimizer/backends/kubernetes/backend.py
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This adds comprehensive unit tests for the OptimizerClient methods in KubernetesBackend, mirroring the existing test structure used for TrainerClient in backend_test.py.
Tests cover:
All tests use pytest fixtures, mock Kubernetes API calls closes #126
What this PR does / why we need it:
Adds unit tests for
OptimizerClientin the Kubernetes backend, exactly matching the style and structure of the existingTrainerClienttests inbackend_test.py.Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...format, will close the issue(s) when PR gets merged):it closes #126
Fixes #126
Checklist:
-[x] Tests added ('tests_OptimizerClient.py`)
TestCase)