allocatortesting

package
v0.34.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestAllocator

func TestAllocator(t *testing.T,
	supportedFeatures Features,
	newAllocator func(
		ctx context.Context,
		features Features,
		claimsToAllocate []*resourceapi.ResourceClaim,
		allocatedDevices sets.Set[DeviceID],
		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 Allocator

type Allocator = internal.Allocator

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL