testfixtures

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultNamespace     = "testNamespace"
	DefaultOwner         = "testUser"
	DefaultJobset        = "testJobset"
	DefaultQueue         = queue.Queue{Name: "testQueue"}
	DefaultPrincipal     = auth.NewStaticPrincipal(DefaultOwner, "test", []string{"groupA"})
	DefaultContainerPort = v1.ContainerPort{
		Name:          "testContainerPort",
		ContainerPort: 8080,
		Protocol:      "TCP",
	}
	DefaultResources = v1.ResourceRequirements{
		Requests: v1.ResourceList{
			"cpu":    resource.MustParse("1"),
			"memory": resource.MustParse("1Gi"),
		},
		Limits: v1.ResourceList{
			"cpu":    resource.MustParse("1"),
			"memory": resource.MustParse("1Gi"),
		},
	}
	DefaultContainers = []v1.Container{
		{
			Name:      "testContainer",
			Ports:     []v1.ContainerPort{DefaultContainerPort},
			Resources: DefaultResources,
		},
	}
	DefaultTolerations = []v1.Toleration{
		{
			Key:      "armadaproject.io/foo",
			Operator: "Exists",
		},
	}
	DefaultPriorityInt                   = uint32(1000)
	DefaultPriorityFloat                 = float64(DefaultPriorityInt)
	DefaultPriorityClass                 = "testPriorityClass"
	DefaultTerminationGracePeriodSeconds = int64(30)
	DefaultActiveDeadlineSeconds         = int64(3600)
	DefaultTime                          = time.Now().UTC()
	DefaultTimeProto                     = protoutil.ToTimestamp(DefaultTime)
)

Functions

func CreateCancelJobSequenceEvents

func CreateCancelJobSequenceEvents(jobIds []string) []*armadaevents.EventSequence_Event

func CreateCancelJobSetSequenceEvent

func CreateCancelJobSetSequenceEvent() *armadaevents.EventSequence_Event

func CreatePreemptJobSequenceEvents

func CreatePreemptJobSequenceEvents(jobIds []string) []*armadaevents.EventSequence_Event

func CreateReprioritizeJobSequenceEvents

func CreateReprioritizeJobSequenceEvents(jobIds []string, newPriority float64) []*armadaevents.EventSequence_Event

func CreateReprioritizedJobSetSequenceEvent

func CreateReprioritizedJobSetSequenceEvent(newPriority float64) *armadaevents.EventSequence_Event

func DefaultSubmissionConfig

func DefaultSubmissionConfig() configuration.SubmissionConfig

func JobSubmitRequestItem

func JobSubmitRequestItem(i int) *api.JobSubmitRequestItem

func NEventSequenceEvents

func NEventSequenceEvents(n int) []*armadaevents.EventSequence_Event

func SubmitJob

func SubmitJob(i int) *armadaevents.SubmitJob

func SubmitRequestWithNItems

func SubmitRequestWithNItems(n int) *api.JobSubmitRequest

func TestUlid

func TestUlid(i int) *armadaevents.Uuid

func TestUlidGenerator

func TestUlidGenerator() func() *armadaevents.Uuid

TestUlidGenerator returns a function that Generates ulids starting at "00000000000000000000000001" and incrementing by one each time it is called

Types

This section is empty.

Jump to

Keyboard shortcuts

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