tasktestutil

package
v0.0.0-...-a69e935 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTaskConfig

func CreateTaskConfig() *rm_task.Config

CreateTaskConfig crates a test task config with all the default values for the tests. It is a TEST task config.

func GetLimitFromResourceConfig

func GetLimitFromResourceConfig(
	resourcesMap map[string]*respool.ResourceConfig) *scalar.Resources

GetLimitFromResourceConfig gets the limit from the respools resource config

func GetReservationFromResourceConfig

func GetReservationFromResourceConfig(
	resourcesMap map[string]*respool.ResourceConfig) *scalar.Resources

GetReservationFromResourceConfig gets the reservation from the respools resource config

func ValidateResources

func ValidateResources(resources *scalar.Resources, values map[string]int64) bool

ValidateResources validates the resources and the values passed if anything differs it returns false else true

func ValidateStateTransitions

func ValidateStateTransitions(rmtask *rm_task.RMTask,
	states []task.TaskState)

ValidateStateTransitions takes the rmtask and list of transition states. It transitions to those states in order received and after transition and verify there is no error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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