Documentation ¶
Index ¶
- Constants
- Variables
- func Load() (string, test.TestStepFactory, []event.Name)
- func New() test.TestStep
- type Log
- type OCPEventParser
- type OCPRoot
- type OCPState
- type Result
- type RunArtifact
- type RunEnd
- type RunStart
- type Severity
- type Status
- type StepArtifact
- type StepEnd
- type StepStart
- type TargetRunner
- type TestStep
Constants ¶
View Source
const ( TestStartEvent = event.Name("TestStart") TestEndEvent = event.Name("TestEnd") TestLogEvent = event.Name("TestLog") StepStartEvent = event.Name("StepStart") StepEndEvent = event.Name("StepEnd") StepLogEvent = event.Name("StepLog") )
events that we may emit during the plugin's lifecycle
View Source
const ( SeverityInfo = Severity("INFO") SeverityDebug = Severity("DEBUG") SeverityWarning = Severity("WARNING") SeverityError = Severity("ERROR") SeverityFatal = Severity("FATAL") )
View Source
const ( StatusUnkown = Status("UNKNOWN") StatusComplete = Status("COMPLETE") StatusError = Status("ERROR") StatusSkipped = Status("SKIPPED") )
View Source
const ( ResultPass = Result("PASS") ResultFail = Result("FAIL") ResultNA = Result("NOT_APPLICABLE") )
Variables ¶
View Source
var Events = []event.Name{ TestStartEvent, TestEndEvent, TestLogEvent, StepStartEvent, StepEndEvent, StepLogEvent, }
Events defines the events that a TestStep is allow to emit. Emitting an event that is not registered here will cause the plugin to terminate with an error.
View Source
var Name = "Exec"
Name is the name used to look this plugin up.
Functions ¶
Types ¶
type Log ¶
type Log struct { Severity Severity `json:"severity,omitempty"` Text string `json:"text,omitempty"` }
TODO: these should just be temporary until the go:generate tool TODO: this should also mean refactoring all the parser code
type OCPEventParser ¶
type OCPEventParser struct {
// contains filtered or unexported fields
}
func NewOCPEventParser ¶
func NewOCPEventParser(target *target.Target, ev testevent.Emitter) *OCPEventParser
func (*OCPEventParser) Error ¶
func (ep *OCPEventParser) Error() error
type OCPRoot ¶
type OCPRoot struct { SequenceNumber int `json:"sequenceNumber"` Timestamp string `json:"timestamp"` RunArtifact *RunArtifact `json:"testRunArtifact,omitempty"` StepArtifact *StepArtifact `json:"testStepArtifact,omitempty"` }
type OCPState ¶
type OCPState struct {
RunEnd *RunEnd
}
TODO: check if there can be multiple runs in the same output
type RunArtifact ¶
type StepArtifact ¶
type TargetRunner ¶
type TargetRunner struct {
// contains filtered or unexported fields
}
func NewTargetRunner ¶
func NewTargetRunner(ts *TestStep, ev testevent.Emitter) *TargetRunner
type TestStep ¶
type TestStep struct {
// contains filtered or unexported fields
}
TestStep implementation for the exec plugin
func (*TestStep) Run ¶
func (ts *TestStep) Run(ctx xcontext.Context, ch test.TestStepChannels, params test.TestStepParameters, ev testevent.Emitter, resumeState json.RawMessage) (json.RawMessage, error)
Run executes the step.
func (*TestStep) ValidateParameters ¶
func (ts *TestStep) ValidateParameters(_ xcontext.Context, stepParams test.TestStepParameters) error
ValidateParameters validates the parameters associated to the step
Click to show internal directories.
Click to hide internal directories.