mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
Merge pull request #134967 from ttsuuubasa/dra-bc-allocator-test
scheduler: KEP-5007 allocator test - devices w/wo BindingConditions
This commit is contained in:
commit
ac46677d2a
1 changed files with 26 additions and 0 deletions
|
|
@ -3960,6 +3960,32 @@ func TestAllocator(t *testing.T,
|
|||
},
|
||||
},
|
||||
},
|
||||
"binding-conditions-with-and-without": {
|
||||
features: Features{
|
||||
DeviceBindingAndStatus: true,
|
||||
},
|
||||
claimsToAllocate: objects(
|
||||
claimWithRequests(claim0, nil,
|
||||
request(req0, classA, 1),
|
||||
request(req1, classA, 1))),
|
||||
classes: objects(class(classA, driverA)),
|
||||
slices: unwrap(slice(slice1, node1, pool1, driverA,
|
||||
device(device1, nil, nil),
|
||||
device(device2, nil, nil).withBindingConditions([]string{"IsPrepare"}, []string{"BindingFailed"}),
|
||||
)),
|
||||
node: node(node1, region1),
|
||||
expectResults: []any{
|
||||
resourceapi.AllocationResult{
|
||||
Devices: resourceapi.DeviceAllocationResult{
|
||||
Results: []resourceapi.DeviceRequestAllocationResult{
|
||||
deviceAllocationResult(req0, driverA, pool1, device1, false),
|
||||
deviceRequestAllocationResultWithBindingConditions(req1, driverA, pool1, device2, []string{"IsPrepare"}, []string{"BindingFailed"}),
|
||||
},
|
||||
},
|
||||
NodeSelector: localNodeSelector(node1),
|
||||
},
|
||||
},
|
||||
},
|
||||
"binding-conditions-without-feature-gate": {
|
||||
features: Features{
|
||||
DeviceBindingAndStatus: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue