-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK] Add more unit tests for TrainingClient APIs #2161
Comments
@andreyvelich: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Hello @andreyvelich I am working on writing unit test for get_job, so should I seperate the test_data both for create_job and get_job individually or combine them into single test_data by adding one more identifier to each sample which tells for which function ( create_job or get_job) the test is for? Example test data -
|
Thank you for your contribution @ayushrakesh! I think it is easier to separate tests data for WDYT @droctothorpe @deepanker13 @kubeflow/wg-training-leads ? |
As my understanding, this is unit tests, not integration tests. So, dedicated test data every for functions would be better. |
In general, if you can recycle fixtures to reduce redundancy, that's usually advisable; whether or not that's possible depends on the expected IO of the two functions; |
@andreyvelich Thank you for guiding me in contributing to Training-Operator and Katib. I'll write some test cases for |
Thank you @Electronic-Waste. |
I'm interested in working on the unit test for get_job_pods, any objection? |
Sure, thank you for your time @YosiElias! |
Having a different list will make code more readable, Also should we create a folder and have a test file for each function to make it more organised? @andreyvelich |
@deepanker13 Usually, test file have the same name as the actual file with |
Will the number of test cases be too many to keep in a single I was thinking of moving test data, fixtures and utility functions from the katib_client_test module, for example, and putting these in newly created That way, I was thinking that the code may be easier to maintain in the And Please let me know your thoughts. Reference: kubeflow/katib@master...tariq-hasan:katib:add-unit-test-for-katib-client-tune |
@tariq-hasan I think, we discussed before with @droctothorpe that we want to keep I feel that the test data should be associated with function that we test: Any concerns you see with that @tariq-hasan ? |
That sounds good. Thanks for the clarification. |
I'm interested in working on the unit test for get_job_pod_names and update_job, any objection? |
Absolutely, thank you @YosiElias! |
@andreyvelich UTs for Also, can I work on |
Hey @andreyvelich, I can take a look at |
Hi @andreyvelich, I am interested in contributing to training-operator. Can I take |
Feel free to take the task. |
Hi, is anyone working on |
@seanlaii Sure, please feel free to take unit test for |
Right now, we have unit test for every single public API of TrainingClient() 🎉 |
We need to add more unit tests for
TrainingClient
APIs by updating thetraining_client_test.py
.That should help us to detect bugs like this one: #2160.
Let's use this issue to track unit tests for various public APIs.
Feel free to submit PR to add unit tests for one of the following APIs, just comment on this issue on which unit tests you are working on:
create_job
Training operator SDK unit test #1938wait_for_job_conditions
[SDK] Add UTs forwait_for_job_conditions
#2196get_job
[SDK] test: add unit test for get_job method of the training_client #2205list_jobs
[SDK] test: add unit test for list_jobs method of the training_client #2267get_job_conditions
[SDK] Training Client Conditions related unit tests #2253is_job_created
[SDK] Training Client Conditions related unit tests #2253is_job_running
[SDK] Training Client Conditions related unit tests #2253is_job_restarting
[SDK] Training Client Conditions related unit tests #2253is_job_succeeded
[SDK] Training Client Conditions related unit tests #2253is_job_failed
[SDK] Training Client Conditions related unit tests #2253get_job_pods
[SDK] Add more unit tests for TrainingClient APIs - get_job_pods #2175get_job_pod_names
[SDK] Unit tests for TrainingClient APIs - get_job_pod_names and update_job #2192get_job_logs
[SDK] test: add unit test for get_job_logs method of the training_client #2275update_job
[SDK] Unit tests for TrainingClient APIs - get_job_pod_names and update_job #2192delete_job
[SDK] test: add unit tests for delete_job() method #2232cc @kubeflow/wg-training-leads @deepanker13 @Electronic-Waste @tariq-hasan
/good-first-issue
/area sdk
/area testing
The text was updated successfully, but these errors were encountered: