Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/scheduler/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,13 @@ func TestFitResourceQuotaNonNvidia(t *testing.T) {
// One MLU vmemory unit is 256 MiB, so a limit of 100 units leaves room for
// 25600 MiB. Comparing the request against the raw 100 would deny every pod.
qm.Quotas["mlu-mem"] = &device.DeviceQuota{
"cambricon.com/mlu.smlu.vmemory": &device.Quota{Used: 0, Limit: 100},
"cambricon.com/mlu.smlu.vmemory": &device.Quota{Used: 0, Limit: 100, LimitSet: true},
}
qm.Quotas["mlu-core"] = &device.DeviceQuota{
"cambricon.com/mlu.smlu.vcore": &device.Quota{Used: 20, Limit: 50},
"cambricon.com/mlu.smlu.vcore": &device.Quota{Used: 20, Limit: 50, LimitSet: true},
}
qm.Quotas["dcu-mem"] = &device.DeviceQuota{
"hygon.com/dcumem": &device.Quota{Used: 0, Limit: 1000},
"hygon.com/dcumem": &device.Quota{Used: 0, Limit: 1000, LimitSet: true},
}
t.Cleanup(func() {
for _, ns := range []string{"mlu-mem", "mlu-core", "dcu-mem"} {
Expand Down Expand Up @@ -590,7 +590,7 @@ func TestFitResourceQuotaCountsEveryDevice(t *testing.T) {
qm := device.NewQuotaManager()
// 60 units is 15360 MiB of headroom.
qm.Quotas["mlu-multi"] = &device.DeviceQuota{
"cambricon.com/mlu.smlu.vmemory": &device.Quota{Used: 0, Limit: 60},
"cambricon.com/mlu.smlu.vmemory": &device.Quota{Used: 0, Limit: 60, LimitSet: true},
}
t.Cleanup(func() { delete(qm.Quotas, "mlu-multi") })

Expand Down Expand Up @@ -649,7 +649,7 @@ func TestFitResourceQuotaAscendMemoryFactor(t *testing.T) {

qm := device.NewQuotaManager()
qm.Quotas["ascend"] = &device.DeviceQuota{
"huawei.com/Ascend910B-memory": &device.Quota{Used: 0, Limit: 8192},
"huawei.com/Ascend910B-memory": &device.Quota{Used: 0, Limit: 8192, LimitSet: true},
}
t.Cleanup(func() { delete(qm.Quotas, "ascend") })

Expand Down
Loading