operator

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package operator provides functionality to run tests on operators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operator

type Operator struct {

	// Command, Is the command that is executed on the test subject
	Command string
	// Name, is the name of the test subject,e.g. Operator name
	Name string
	// Namespace, is the name of the namespace the operator is deployed
	Namespace string
	// ExpectStatus, Is the is list of  expected output from the command
	ExpectStatus []string
	// Action, Specifies the action to ba taken on the return result
	Action testcases.TestAction
	// ResultType, Informs the type of result expected
	ResultType testcases.TestResultType
	// contains filtered or unexported fields
}

Operator that is under test.

func NewOperator

func NewOperator(args []string, name, namespace string, expectedStatus []string, resultType testcases.TestResultType, action testcases.TestAction, timeout time.Duration) *Operator

NewOperator creates a `Container` test on the configured test cases.

func (*Operator) Args

func (p *Operator) Args() []string

Args returns the command line args for the test.

func (*Operator) Facts

func (p *Operator) Facts() string

Facts collects facts of the container

func (*Operator) GetIdentifier

func (p *Operator) GetIdentifier() identifier.Identifier

GetIdentifier returns the tnf.Test specific identifier.

func (*Operator) ReelEOF

func (p *Operator) ReelEOF()

ReelEOF does nothing.

func (*Operator) ReelFirst

func (p *Operator) ReelFirst() *reel.Step

ReelFirst returns a step which expects an pod status for the given pod.

func (*Operator) ReelMatch

func (p *Operator) ReelMatch(_, _, match string) *reel.Step

ReelMatch parses the status output and set the test result on match. Returns no step; the test is complete.

func (*Operator) ReelTimeout

func (p *Operator) ReelTimeout() *reel.Step

ReelTimeout does nothing;

func (*Operator) Result

func (p *Operator) Result() int

Result returns the test result.

func (*Operator) Timeout

func (p *Operator) Timeout() time.Duration

Timeout return the timeout for the test.

Jump to

Keyboard shortcuts

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