-
Notifications
You must be signed in to change notification settings - Fork 971
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 tests for package resourcequota plugin. #3320
test: add tests for package resourcequota plugin. #3320
Conversation
Welcome @Subhasish-Behera! |
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
943c2a7
to
a8b72ca
Compare
60b889f
to
b697c07
Compare
Signed-off-by: Subhasish Behera [email protected] Signed-off-by: Subhasish Behera <[email protected]>
b697c07
to
ab0af40
Compare
@@ -0,0 +1,146 @@ | |||
/* | |||
Copyright 2021 The Volcano Authors. |
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.
Please change to 2024.
package resourcequota | ||
|
||
import ( | ||
"fmt" |
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.
Please sort imports.
Plugins: []conf.PluginOption{ | ||
{ | ||
Name: PluginName, | ||
//Arguments: test.arguments, |
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.
commented code can be removed.
job: &api.JobInfo{ | ||
UID: "1", | ||
Namespace: "namespace1", | ||
PodGroup: &api.PodGroup{ |
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.
we can define a function in pkg/scheduler/util/test_utils.go
to generate the wanted podgroup, so that code looks more clean.
} | ||
defer framework.CloseSession(ssn) | ||
plugin := &resourceQuotaPlugin{} | ||
plugin.OnSessionOpen(ssn) |
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.
framework.OpenSession
will run alll your registered plugins'.
@Subhasish-Behera now we can use the |
@lowang-bh thanks for informing. will make the necessary changes to get this merged |
@Subhasish-Behera: 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. |
@Subhasish-Behera Hi, thank you for your contribution! The related functions have been merged. refer to: #3452 (comment) |
/close |
@lowang-bh: Closed this PR. 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/test-infra repository. |
partially fixes #3053 .
Add UTs for
/volcano/pkg/scheduler/plugins/resourcequota/resourcequota.go