dynamic-resource-allocationk8s.io/dynamic-resource-allocation/structured/internal/allocatortesting Index | Files

package allocatortesting

import "k8s.io/dynamic-resource-allocation/structured/internal/allocatortesting"

Index

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 Allocator = internal.Allocator

type ConsumedCapacity

type ConsumedCapacity = internal.ConsumedCapacity

type ConsumedCapacityCollection

type ConsumedCapacityCollection = internal.ConsumedCapacityCollection

type DeviceClassLister

type DeviceClassLister = internal.DeviceClassLister

type DeviceID

type DeviceID = internal.DeviceID

func MakeDeviceID

func MakeDeviceID(driver, pool, device string) DeviceID

type Features

type Features = internal.Features

type SharedDeviceID

type SharedDeviceID = internal.SharedDeviceID

types_experimental

Source Files

allocator_testing.go

Version
v0.35.0-alpha.0
Published
Aug 7, 2025
Platform
windows/amd64
Imports
24 packages
Last checked
2 seconds ago

Tools for package owners.