register

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Tests = map[string]*Test{}

Registered tests live here. Mapping of names to tests.

Functions

func Register

func Register(t *Test)

Register is usually called in init() functions and is how kola test harnesses knows which tests it can choose from. Panics if existing name is registered

Types

type Test

type Test struct {
	Name             string // should be uppercase and unique
	Run              func(cluster.TestCluster)
	NativeFuncs      map[string]func() error
	UserData         string
	ClusterSize      int
	Platforms        []string // whitelist of platforms to run test against -- defaults to all
	ExcludePlatforms []string // blacklist of platforms to ignore -- defaults to none
	Architectures    []string // whitelist of machine architectures supported -- defaults to all

	// MinVersion prevents the test from executing on CoreOS machines
	// less than MinVersion. This will be ignored if the name fully
	// matches without globbing.
	MinVersion semver.Version

	// EndVersion prevents the test from executing on CoreOS machines
	// greater than or equal to EndVersion. This will be ignored if
	// the name fully matches without globbing.
	EndVersion semver.Version
}

Test provides the main test abstraction for kola. The run function is the actual testing function while the other fields provide ways to statically declare state of the platform.TestCluster before the test function is run.

Jump to

Keyboard shortcuts

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