package allocatortesting
import "k8s.io/dynamic-resource-allocation/structured/internal/allocatortesting"
Index ¶
- func TestAllocator(t *testing.T, supportedFeatures Features, newAllocator func( ctx context.Context, features Features, allocateState AllocatedState, classLister DeviceClassLister, slices []*resourceapi.ResourceSlice, celCache *cel.Cache, ) (Allocator, error))
- type AllocatedState
- type Allocator
- type ConsumedCapacity
- type ConsumedCapacityCollection
- type DeviceClassLister
- type DeviceID
- type Features
- type SharedDeviceID
Functions ¶
func TestAllocator ¶
func TestAllocator(t *testing.T, supportedFeatures Features, newAllocator func( ctx context.Context, features Features, allocateState AllocatedState, classLister DeviceClassLister, slices []*resourceapi.ResourceSlice, celCache *cel.Cache, ) (Allocator, error))
TestAllocator runs as many of the shared tests against a specific allocator implementation as possible. Test cases which depend on features that are not supported by the implementation are silently skipped.
Types ¶
type AllocatedState ¶
type AllocatedState = internal.AllocatedState
type Allocator ¶
type ConsumedCapacity ¶
type ConsumedCapacity = internal.ConsumedCapacity
type ConsumedCapacityCollection ¶
type ConsumedCapacityCollection = internal.ConsumedCapacityCollection
type DeviceClassLister ¶
type DeviceClassLister = internal.DeviceClassLister
type DeviceID ¶
func MakeDeviceID ¶
type Features ¶
type SharedDeviceID ¶
type SharedDeviceID = internal.SharedDeviceID
types_experimental
Source Files ¶
allocator_testing.go
- Version
- v0.34.0-rc.0
- Published
- Aug 8, 2025
- Platform
- js/wasm
- Imports
- 24 packages
- Last checked
- 2 minutes ago –
Tools for package owners.