@@ -17,7 +17,6 @@ limitations under the License.
1717package flavorassigner
1818
1919import (
20- "fmt"
2120 "testing"
2221
2322 "github.com/go-logr/logr"
@@ -254,7 +253,7 @@ func TestAssignFlavors(t *testing.T) {
254253 },
255254 Status : & Status {
256255 reasons : []string {
257- "insufficient quota for memory in flavor b_one in ClusterQueue " ,
256+ "insufficient quota for memory in flavor b_one, request > maximum capacity (10Mi > 1Mi) " ,
258257 },
259258 },
260259 Count : 1 ,
@@ -366,9 +365,9 @@ func TestAssignFlavors(t *testing.T) {
366365 },
367366 Status : & Status {
368367 reasons : []string {
369- "insufficient unused quota in cohort for cpu in flavor one, 1 more needed " ,
370- "insufficient unused quota in cohort for memory in flavor two, 5Mi more needed" ,
371- "insufficient unused quota in cohort for example.com/gpu in flavor b_one, 1 more needed" ,
368+ "insufficient quota for cpu in flavor one, request > maximum capacity (3 > 2) " ,
369+ "insufficient unused quota for memory in flavor two, 5Mi more needed" ,
370+ "insufficient unused quota for example.com/gpu in flavor b_one, 1 more needed" ,
372371 },
373372 },
374373 Count : 1 ,
@@ -407,8 +406,8 @@ func TestAssignFlavors(t *testing.T) {
407406 },
408407 Status : & Status {
409408 reasons : []string {
410- "insufficient quota for cpu in flavor one in ClusterQueue " ,
411- "insufficient quota for memory in flavor two in ClusterQueue " ,
409+ "insufficient quota for cpu in flavor one, request > maximum capacity (3 > 2) " ,
410+ "insufficient quota for memory in flavor two, request > maximum capacity (10Mi > 5Mi) " ,
412411 },
413412 },
414413 Count : 1 ,
@@ -836,7 +835,7 @@ func TestAssignFlavors(t *testing.T) {
836835 corev1 .ResourceCPU : resource .MustParse ("2" ),
837836 },
838837 Status : & Status {
839- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 1 more needed " },
838+ reasons : []string {"insufficient quota for cpu in flavor one, request > maximum capacity (2 > 1) " },
840839 },
841840 Count : 1 ,
842841 }},
@@ -882,7 +881,7 @@ func TestAssignFlavors(t *testing.T) {
882881 },
883882
884883 Status : & Status {
885- reasons : []string {"borrowing limit for cpu in flavor one exceeded " },
884+ reasons : []string {"insufficient unused quota for cpu in flavor one, 1 more needed " },
886885 },
887886 Count : 1 ,
888887 }},
@@ -963,7 +962,7 @@ func TestAssignFlavors(t *testing.T) {
963962 corev1 .ResourceCPU : resource .MustParse ("2" ),
964963 },
965964 Status : & Status {
966- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 2 more needed" },
965+ reasons : []string {"insufficient unused quota for cpu in flavor one, 2 more needed" },
967966 },
968967 Count : 1 ,
969968 }},
@@ -1080,7 +1079,7 @@ func TestAssignFlavors(t *testing.T) {
10801079 },
10811080 Status : & Status {
10821081 reasons : []string {
1083- "insufficient quota for cpu in flavor one in ClusterQueue " ,
1082+ "insufficient quota for cpu in flavor one, request > maximum capacity (12 > 4) " ,
10841083 "insufficient unused quota for cpu in flavor tainted, 3 more needed" ,
10851084 },
10861085 },
@@ -1176,7 +1175,7 @@ func TestAssignFlavors(t *testing.T) {
11761175 corev1 .ResourcePods : resource .MustParse ("3" ),
11771176 },
11781177 Status : & Status {
1179- reasons : []string {fmt . Sprintf ( "insufficient quota for %s in flavor default in ClusterQueue" , corev1 . ResourcePods ) },
1178+ reasons : []string {"insufficient quota for pods in flavor default, request > maximum capacity (3 > 2)" },
11801179 },
11811180 Count : 3 ,
11821181 }},
@@ -1504,7 +1503,7 @@ func TestAssignFlavors(t *testing.T) {
15041503 corev1 .ResourceCPU : {Name : "one" , Mode : Preempt , TriedFlavorIdx : 0 },
15051504 },
15061505 Status : & Status {
1507- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 10 more needed" },
1506+ reasons : []string {"insufficient unused quota for cpu in flavor one, 10 more needed" },
15081507 },
15091508 Requests : corev1.ResourceList {
15101509 corev1 .ResourceCPU : resource .MustParse ("12" ),
@@ -1561,7 +1560,7 @@ func TestAssignFlavors(t *testing.T) {
15611560 corev1 .ResourceCPU : {Name : "one" , Mode : Preempt , TriedFlavorIdx : 0 },
15621561 },
15631562 Status : & Status {
1564- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 10 more needed" },
1563+ reasons : []string {"insufficient unused quota for cpu in flavor one, 10 more needed" },
15651564 },
15661565 Requests : corev1.ResourceList {
15671566 corev1 .ResourceCPU : resource .MustParse ("12" ),
@@ -1660,7 +1659,7 @@ func TestAssignFlavors(t *testing.T) {
16601659 {
16611660 Name : "main" ,
16621661 Status : & Status {
1663- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 11 more needed " },
1662+ reasons : []string {"insufficient quota for cpu in flavor one, request > maximum capacity (12 > 11) " },
16641663 },
16651664 Requests : corev1.ResourceList {
16661665 corev1 .ResourceCPU : resource .MustParse ("12" ),
@@ -1813,7 +1812,7 @@ func TestAssignFlavors(t *testing.T) {
18131812 corev1 .ResourcePods : resource .MustParse ("1" ),
18141813 },
18151814 Status : & Status {
1816- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 1 more needed" },
1815+ reasons : []string {"insufficient unused quota for cpu in flavor one, 1 more needed" },
18171816 },
18181817 Count : 1 ,
18191818 }},
@@ -1861,7 +1860,7 @@ func TestAssignFlavors(t *testing.T) {
18611860 corev1 .ResourceCPU : {Name : "one" , Mode : Preempt , TriedFlavorIdx : 0 },
18621861 },
18631862 Status : & Status {
1864- reasons : []string {"insufficient unused quota in cohort for cpu in flavor one, 10 more needed" },
1863+ reasons : []string {"insufficient unused quota for cpu in flavor one, 10 more needed" },
18651864 },
18661865 Requests : corev1.ResourceList {
18671866 corev1 .ResourceCPU : resource .MustParse ("12" ),
0 commit comments