Documentation ¶
Overview ¶
Package tnf contains the core Test runner interfaces.
Index ¶
Constants ¶
View Source
const ( // ERROR represents an errored test. ERROR = iota // SUCCESS represents a successful test. SUCCESS // FAILURE represents a failed test. FAILURE )
Variables ¶
ExitCodeMap maps a test result value to a more appropriate Unix return code.
Functions ¶
This section is empty.
Types ¶
type Test ¶
type Test struct {
// contains filtered or unexported fields
}
Test runs a chain of Handlers.
func NewTest ¶
func NewTest(expecter *expect.Expecter, tester Tester, chain []reel.Handler, errorChannel <-chan error) (*Test, error)
NewTest creates a new Test given a chain of Handlers.
func (*Test) ReelEOF ¶
func (t *Test) ReelEOF()
ReelEOF calls the current Handler's ReelEOF function.
func (*Test) ReelTimeout ¶
ReelTimeout calls the current Handler's ReelTimeout function.
type Tester ¶
type Tester interface { // Args returns the CLI command as a string array. Args() []string // GetIdentifier returns the tnf.Test specific identifier. GetIdentifier() identifier.Identifier // Result returns the result of the test (ERROR, SUCCESS, or FAILURE). Result() int // Timeout returns the test timeout as a Duration. Timeout() time.Duration }
Tester provides the interface for a Test.
Directories ¶
Path | Synopsis |
---|---|
Package config provides configurations handler for cnf test framework.
|
Package config provides configurations handler for cnf test framework. |
Package dependencies provides constants related to test runtime dependencies.
|
Package dependencies provides constants related to test runtime dependencies. |
Package handlers provides a variety of Test Handler implementations.
|
Package handlers provides a variety of Test Handler implementations. |
base/redhat
Package redhat provides a tnf.Test implementation which tests whether a container is based on Red Hat technologies.
|
Package redhat provides a tnf.Test implementation which tests whether a container is based on Red Hat technologies. |
container
Package container provides functionality to test pod and container level checks.
|
Package container provides functionality to test pod and container level checks. |
generic
Package generic provides a simplified interface for creating a tnf.Test and corresponding reel.Handler from generic JSON input.
|
Package generic provides a simplified interface for creating a tnf.Test and corresponding reel.Handler from generic JSON input. |
generic/assertion
Package assertion defines the ability for users to include assertions on the regular expression matched in ReelMatch.
|
Package assertion defines the ability for users to include assertions on the regular expression matched in ReelMatch. |
generic/condition
Package condition defines the Condition Evaluate contract.
|
Package condition defines the Condition Evaluate contract. |
generic/condition/intcondition
Package intcondition exposes some common integer condition implementations.
|
Package intcondition exposes some common integer condition implementations. |
generic/condition/stringcondition
Package stringcondition exposes some common string condition implementations.
|
Package stringcondition exposes some common string condition implementations. |
hostname
Package hostname provides a hostname discovery test utilizing the `hostname` Unix command.
|
Package hostname provides a hostname discovery test utilizing the `hostname` Unix command. |
ipaddr
Package ipaddr provides an ip address polling test utilizing the `ip` Unix command.
|
Package ipaddr provides an ip address polling test utilizing the `ip` Unix command. |
node
Package node provides a tnf.Test implementation for getting OpenShift node information for a cluster.
|
Package node provides a tnf.Test implementation for getting OpenShift node information for a cluster. |
operator
Package operator provides functionality to run tests on operators.
|
Package operator provides functionality to run tests on operators. |
ping
Package ping provides a test ICMPv4 implementation using the `ping` Unix command.
|
Package ping provides a test ICMPv4 implementation using the `ping` Unix command. |
Package identifier provides a test identifier definition for tnf.Test implementations and a catalog of known tests.
|
Package identifier provides a test identifier definition for tnf.Test implementations and a catalog of known tests. |
Package interactive provides common implementations of the expect.Expecter interface including oc, shell, and ssh.
|
Package interactive provides common implementations of the expect.Expecter interface including oc, shell, and ssh. |
mocks
Package mock_expect is a generated GoMock package.
|
Package mock_expect is a generated GoMock package. |
Package reel runs a target subprocess with programmatic control over interaction with it.
|
Package reel runs a target subprocess with programmatic control over interaction with it. |
Package testcases defines various test case templates configurations.
|
Package testcases defines various test case templates configurations. |
data/cnf
Package cnf defines various test case templates definitions.
|
Package cnf defines various test case templates definitions. |
data/operator
Package operator defines various test case templates definitions.
|
Package operator defines various test case templates definitions. |
Click to show internal directories.
Click to hide internal directories.