Skip to content

Commit

Permalink
Add failing test for humanize bug
Browse files Browse the repository at this point in the history
Related to: #7770
  • Loading branch information
adrianmoisey committed Jan 26, 2025
1 parent 3291bae commit a730b44
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vertical-pod-autoscaler/pkg/recommender/model/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ func TestResourcesAsResourceList(t *testing.T) {
apiv1.ResourceMemory: *resource.NewQuantity(839500000, resource.DecimalSI),
},
},
{
name: "zero values without humanize",
resources: Resources{
ResourceCPU: 1000,
ResourceMemory: 2852574758, // 2.66Gi
},
humanize: true,
resourceList: apiv1.ResourceList{
apiv1.ResourceCPU: *resource.NewMilliQuantity(1000, resource.DecimalSI),
apiv1.ResourceMemory: resource.MustParse("2.66Gi"),
},
},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
Expand Down

0 comments on commit a730b44

Please sign in to comment.