-
Notifications
You must be signed in to change notification settings - Fork 54
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
test:Add unit tests to jobset success policy functions #491 #493
test:Add unit tests to jobset success policy functions #491 #493
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Dibyanshuaman The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @Dibyanshuaman! |
Hi @Dibyanshuaman. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
✅ Deploy Preview for kubernetes-sigs-jobset ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
/ok-to-test |
pkg/controllers/success_policy.go
Outdated
@@ -22,6 +22,107 @@ import ( | |||
) | |||
|
|||
// TODO: add unit tests for the functions in this file. | |||
// TestJobMatchesSuccessPolicy tests the jobMatchesSuccessPolicy function. | |||
func TestJobMatchesSuccessPolicy(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In golang, unit tests are added with a corresponding *_test.go.
So I would move these tests to a pkg/controllers/success_policy_test.go file.
So shall i move all the unit test on separate file as instructed by you?
…On Thu, 4 Apr, 2024, 1:49 am Kevin Hannon, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkg/controllers/success_policy.go
<#493 (comment)>
:
> @@ -22,6 +22,107 @@ import (
)
// TODO: add unit tests for the functions in this file.
+// TestJobMatchesSuccessPolicy tests the jobMatchesSuccessPolicy function.
+func TestJobMatchesSuccessPolicy(t *testing.T) {
In golang, unit tests are added with a corresponding *_test.go.
So I would move these tests to a pkg/controllers/success_policy_test.go
file.
—
Reply to this email directly, view it on GitHub
<#493 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BHB2OO3YVJ26TSYAHWCB3JTY3RP63AVCNFSM6AAAAABFV7G77CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNZXHA4DCOBWGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Dibyanshuaman are you still working on this? |
No reply was given for my question so no not working right now
|
I +1 the comment. Yes, please move all the unit test into a separate test file. Your PR is failing due to this. Please make sure the CI jobs are green. |
@Dibyanshuaman: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
Thank you @Dibyanshuaman! The CI is failing due to syntax error. Please fix that. |
@Dibyanshuaman please use table-driven tests to test different scenarios for each function. Example: jobset/pkg/controllers/startup_policy_test.go Lines 25 to 45 in 8860f83
|
PR needs rebase. 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/test-infra repository. |
@Dibyanshuaman are you still working on this? |
Closing due to inactivity /close |
No description provided.