-
Notifications
You must be signed in to change notification settings - Fork 251
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
Refactor TestSnapshot #538
Refactor TestSnapshot #538
Conversation
I adapt the test to preemption. |
188c2bc
to
f004bb9
Compare
This PR is ready for review. /assign @alculquicondor |
pkg/cache/snapshot_test.go
Outdated
{ | ||
Name: "demand", | ||
Min: 100_000, | ||
wantSnapshot: Snapshot{ |
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.
maybe you can do
wantSnapshot: func() Snapshot {
cohort := .....
return Snapshot{
}
}
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.
Sounds good.
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.
Done.
f004bb9
to
f43f0c3
Compare
pkg/cache/snapshot_test.go
Outdated
ResourceFlavors: map[string]*kueue.ResourceFlavor{}, | ||
}, | ||
}, | ||
"clusterQueues": { |
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.
independent clusterQueues
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.
Done.
pkg/cache/snapshot_test.go
Outdated
{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: "with-preemption", | ||
"workloads": { |
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.
I would just merge this one with the test case above titled "clusterQueues"
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.
I'm ok with that.
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.
Done.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, tenzen-y The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
f43f0c3
to
5d67803
Compare
✅ Deploy Preview for kubernetes-sigs-kueue canceled.
|
@alculquicondor I addressed your comments. PTAL. |
/lgtm |
Signed-off-by: Yuki Iwai yuki.iwai.tz@gmail.com
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
I refactored tests for the snapshot.
Which issue(s) this PR fixes:
Fixes #72,#269
Special notes for your reviewer: