test

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const HTTP2_GOAWAY_CHECK = "http2: server sent GOAWAY and closed the connection"

Variables

This section is empty.

Functions

func RunAPI

func RunAPI(T *Tester, verbose int) (err error)

func RunBash

func RunBash(T *Tester, verbose int) (err error)

func RunExec

func RunExec(T *Tester, verbose int) (err error)

func RunHLS

func RunHLS(T *Tester, verbose int) (err error)

func RunTest

func RunTest(T *Tester, verbose int) (err error)

func RunTestFromArgsFlags

func RunTestFromArgsFlags(args []string, cmdflags flags.TestFlagpole) error

Types

type BaseTester

type BaseTester struct {
	Dir    string
	Env    map[string]string
	Sysenv bool
}

type BashTester

type BashTester struct {
	BaseTester

	Script string
}

type ExecTester

type ExecTester struct {
	BaseTester

	Command string
}

type Stats

type Stats struct {
	Pass int
	Fail int
	Skip int

	Start time.Time
	End   time.Time
	Time  time.Duration
}

func RunSuites

func RunSuites(suites []Suite, verbose int) (TS Stats, err error)

type Suite

type Suite struct {
	// Name of the Suite (Cue field)
	Name string

	// Runtime the Cue values were built from
	CTX *cue.Context

	// Cue Value for the Suite
	Value cue.Value

	// Extracted testers, including any selectors
	Tests []Tester

	// pass/fail/skip stats
	Stats Stats

	// Total Suite runtime (to account for gaps between tests)
	Runtime time.Duration

	// Errors encountered during the testing
	Errors []error
}

A suite is a collection of testers

type Tester

type Tester struct {
	// Name of the Tester (Cue field)
	Name string

	// Type of the Tester (@test(key[0]))
	Type string

	// Runtime the Cue values were built from
	CTX *cue.Context

	// Cue Value for the Tester
	Value cue.Value

	// Execution output
	Output string

	// pass/fail/skip stats
	Stats Stats

	// Errors encountered during the testing
	Errors []error
}

A tester has configuration for running a set of tests

Jump to

Keyboard shortcuts

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