jobs3

package
v1.6.112 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Submit

func Submit(t *testing.T, filename string, opts ...Option) (*Submission, Cleanup)

Types

type Cleanup

type Cleanup func()

type Logs

type Logs struct {
	Stdout string
	Stderr string
}

type Option

type Option func(*Submission)

func AuthToken

func AuthToken(token string) Option

func DisableCleanup

func DisableCleanup() Option

func DisableRandomJobID

func DisableRandomJobID() Option

func Namespace

func Namespace(name string) Option

func SkipDeploymentHealthy

func SkipDeploymentHealthy() Option

SkipDeploymentHealthy will skip waiting for the deployment to become healthy.

func SkipEvalComplete

func SkipEvalComplete() Option

SkipEvalComplete will skip waiting for the evaluation(s) to be complete.

Implies SkipDeploymentHealthy.

func Timeout

func Timeout(timeout time.Duration) Option

func Var

func Var(key, value string) Option

Set an HCL variable.

func Verbose

func Verbose(on bool) Option

Verbose will turn on verbose logging.

func WaitComplete

func WaitComplete(group string) Option

WaitComplete will wait until all allocations of the given group are in the "complete" state (or timeout, or terminal with another status).

type Submission

type Submission struct {
	// contains filtered or unexported fields
}

func (*Submission) Exec

func (sub *Submission) Exec(group, task string, cmd []string) Logs

Exec executes cmd in the given task of a random allocation of the given group.

func (*Submission) JobID

func (sub *Submission) JobID() string

JobID provides the (possibly) randomized jobID associated with this Submission.

func (*Submission) TaskLogs

func (sub *Submission) TaskLogs(group, task string) Logs

TaskLogs returns the logs of the given task, using a random allocation of the given group.

func (*Submission) TaskLogsByAlloc

func (sub *Submission) TaskLogsByAlloc(group, task string) map[string]Logs

TaskLogsByAlloc returns the logs of the given task, organized by allocation.

Jump to

Keyboard shortcuts

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