generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 500
Open
Labels
kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Description
What would you like to be cleaned:
Follow-up #8452 (comment)
I'd like to add RuntimeHandlers and Images to NodeWrapper:
| type NodeWrapper struct { |
Then try to use those in TASNodeHandler_Update test function:
kueue/pkg/controller/tas/resource_flavor_test.go
Lines 96 to 132 in 2808fa2
| "RuntimeHandler order changed": { | |
| oldNode: func() *corev1.Node { | |
| n := baseNode.Clone().Obj() | |
| n.Status.RuntimeHandlers = []corev1.NodeRuntimeHandler{ | |
| {Name: "test-handler"}, | |
| {Name: "runc"}, | |
| } | |
| return n | |
| }(), | |
| newNode: func() *corev1.Node { | |
| n := baseNode.Clone().Obj() | |
| n.Status.RuntimeHandlers = []corev1.NodeRuntimeHandler{ | |
| {Name: "runc"}, | |
| {Name: "test-handler"}, | |
| } | |
| return n | |
| }(), | |
| wantChanged: nodeUnchanged, | |
| }, | |
| "Images changed": { | |
| oldNode: func() *corev1.Node { | |
| n := baseNode.Clone().Obj() | |
| n.Status.Images = []corev1.ContainerImage{ | |
| {Names: []string{"nginx:1.20"}, SizeBytes: 100}, | |
| } | |
| return n | |
| }(), | |
| newNode: func() *corev1.Node { | |
| n := baseNode.Clone().Obj() | |
| n.Status.Images = []corev1.ContainerImage{ | |
| {Names: []string{"nginx:1.20"}, SizeBytes: 100}, | |
| {Names: []string{"postgres:13"}, SizeBytes: 200}, | |
| } | |
| return n | |
| }(), | |
| wantChanged: nodeUnchanged, | |
| }, |
Why is this needed:
To eliminate anonymous bypass functions from tests.
Metadata
Metadata
Assignees
Labels
kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.Categorizes issue or PR as related to cleaning up code, process, or technical debt.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.