kubernetes/pkg/kubelet/cm/dra/manager_test.go

const driverClassName

const podName

const containerName

type fakeDRADriverGRPCServer

func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) {}

func (s *fakeDRADriverGRPCServer) NodeUnprepareResources(ctx context.Context, req *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) {}

type tearDown

type fakeDRAServerInfo

func setupFakeDRADriverGRPCServer(ctx context.Context, shouldTimeout bool, pluginClientTimeout *time.Duration, prepareResourcesResponse *drapb.NodePrepareResourcesResponse, unprepareResourcesResponse *drapb.NodeUnprepareResourcesResponse) (fakeDRAServerInfo, error) {}

func TestNewManagerImpl(t *testing.T) {}

// genTestPod generates pod object
func genTestPod() *v1.Pod {}

// getTestClaim generates resource claim object
func genTestClaim(name, driver, device, podUID string) *resourceapi.ResourceClaim {}

// genTestClaimInfo generates claim info object
func genTestClaimInfo(podUIDs []string, prepared bool) *ClaimInfo {}

// genClaimInfoState generates claim info state object
func genClaimInfoState(cdiDeviceID string) state.ClaimInfoState {}

func TestGetResources(t *testing.T) {}

func getFakeNode() (*v1.Node, error) {}

func TestPrepareResources(t *testing.T) {}

func TestUnprepareResources(t *testing.T) {}

func TestPodMightNeedToUnprepareResources(t *testing.T) {}

func TestGetContainerClaimInfos(t *testing.T) {}

// TestParallelPrepareUnprepareResources calls PrepareResources and UnprepareResources APIs in parallel
// to detect possible data races
func TestParallelPrepareUnprepareResources(t *testing.T) {}