testcase

package
v0.0.0-...-8a4553c Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestStatus

func NewTestStatus(params TestParameters) testStatus

Types

type EnvSource

type EnvSource string
const (
	EnvSourceBuiltIn  EnvSource = "builtin"
	EnvSourceCommand  EnvSource = "command"
	EnvSourceEnviron  EnvSource = "environ"
	EnvSourceTestcase EnvSource = "testcase"
)

type PrefixWriter

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

func (*PrefixWriter) Write

func (w *PrefixWriter) Write(p []byte) (n int, err error)

type Step

type Step interface {
	Execute(context.Context, *testStatus) StepResult
	IsCleanup() bool
}

type StepResult

type StepResult struct {
	Status StepStatus
	Output string
	Error  error
}

type StepStatus

type StepStatus string
const (
	StepStatusSuccess StepStatus = "success"
	StepStatusFailure StepStatus = "failure"
	StepStatusSkipped StepStatus = "skipped"
)

type TestParameters

type TestParameters struct {
	EnvOverride      []string
	JobID            int
	RunID            string
	TestID           string
	TestLog          *progress.Progress
	OutputToTerminal bool
	StdoutWriter     io.Writer
	StderrWriter     io.Writer
}

type TestResult

type TestResult struct {
	Name         string
	Started      time.Time
	Finished     time.Time
	Success      bool
	SuccessCount int
	FailureCount int
	StepsCount   int
	Results      []StepResult
	Error        error
}

func Execute

func Execute(ctx context.Context, path string, params TestParameters) TestResult

func (TestResult) SkippedCount

func (t TestResult) SkippedCount() int

Jump to

Keyboard shortcuts

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