test

package
v6.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package test is using for HuaWei Ascend testing.

Package test is using for HuaWei Ascend testing.

Package test is using for HuaWei Ascend testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeSchedulerJobAttrByJob

func FakeSchedulerJobAttrByJob(job *api.JobInfo) util.SchedulerJobAttr

FakeSchedulerJobAttrByJob fake scheduler attr by job

func PatchAddJob

func PatchAddJob() *gomonkey.Patches

PatchAddJob go monkey patch

func PatchAddNode

func PatchAddNode() *gomonkey.Patches

PatchAddNode go monkey patch

func PatchForce

func PatchForce() *gomonkey.Patches

PatchForce go monkey patch

func PatchGetRun

func PatchGetRun() *gomonkey.Patches

PatchGetRun go monkey patch

func PatchNew

func PatchNew() *gomonkey.Patches

PatchNew go monkey patch

func PatchNewComRes

func PatchNewComRes() *gomonkey.Patches

PatchNewComRes go monkey patch

func PatchRestart

func PatchRestart() *gomonkey.Patches

PatchRestart go monkey patch

func PatchSynJob

func PatchSynJob() *gomonkey.Patches

PatchSynJob go monkey patch

func PatchSynNode

func PatchSynNode() *gomonkey.Patches

PatchSynNode go monkey patch

Types

type CheckNodeNPUByTaskTestCase

type CheckNodeNPUByTaskTestCase struct {
	Task    *api.TaskInfo
	Name    string
	Attr    util.SchedulerJobAttr
	Node    plugin.NPUNode
	WantErr error
}

CheckNodeNPUByTaskTestCase CheckNodeNPUByTask test case

type InitMyJobPluginTestCase

type InitMyJobPluginTestCase struct {
	Name    string
	Attr    util.SchedulerJobAttr
	Env     plugin.ScheduleEnv
	WantErr error
}

InitMyJobPluginTestCase test case

type JudgeNodeAndTaskNPUTestCase

type JudgeNodeAndTaskNPUTestCase struct {
	NodeTop []int
	Name    string
	TaskNPU int
	WantErr error
}

JudgeNodeAndTaskNPUTestCase JudgeNodeAndTaskNPU test case

type ReleaseAnnotationTestCase

type ReleaseAnnotationTestCase struct {
	Task     *api.TaskInfo
	WantNode *plugin.NPUNode
	Name     string
	Node     plugin.NPUNode
	PodAnno  string
	Attr     util.SchedulerJobAttr
}

ReleaseAnnotationTestCase releaseAnnotation test case

type ScoreBestNPUNodesTestCase

type ScoreBestNPUNodesTestCase struct {
	Task     *api.TaskInfo
	Nodes    []*api.NodeInfo
	ScoreMap map[string]float64
	WantSMap map[string]float64
	Name     string
	WantErr  error
	Attr     util.SchedulerJobAttr
}

ScoreBestNPUNodesTestCase scoreBestNPUNodes test case

type SetMaxNodeNPUNumTestCase

type SetMaxNodeNPUNumTestCase struct {
	Name    string
	Num     int
	WantNum int
}

SetMaxNodeNPUNumTestCase SetMaxNodeNPUNum test case

type UseAnnotationTestCase

type UseAnnotationTestCase struct {
	Task     *api.TaskInfo
	WantNode *plugin.NPUNode
	Name     string
	Node     plugin.NPUNode
	PodAnno  string
	Attr     util.SchedulerJobAttr
}

UseAnnotationTestCase useAnnotation test case

type ValidNPUJobTestCase

type ValidNPUJobTestCase struct {
	WantErr *api.ValidateResult
	Name    string
	Attr    util.SchedulerJobAttr
}

ValidNPUJobTestCase validNPUJob test case

Jump to

Keyboard shortcuts

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