Documentation ¶
Overview ¶
Package output defines output stream from entities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityStream ¶
type EntityStream struct {
// contains filtered or unexported fields
}
EntityStream wraps planner.OutputStream for a single entity.
EntityStream implements testing.OutputStream. EntityStream is goroutine-safe; it is safe to call its methods concurrently from multiple goroutines.
func NewEntityStream ¶
func NewEntityStream(out Stream, ei *protocol.Entity) *EntityStream
NewEntityStream creates entityOutputStream for out and ei.
func (*EntityStream) End ¶
func (w *EntityStream) End(skipReasons []string, timingLog *timing.Log) error
End reports that the entity has ended. After End is called, all methods will fail with an error.
func (*EntityStream) Error ¶
func (w *EntityStream) Error(e *protocol.Error) error
Log reports an error from the entity.
func (*EntityStream) Errors ¶
func (w *EntityStream) Errors() []*protocol.Error
Errors returns errors reported so far.
func (*EntityStream) Log ¶
func (w *EntityStream) Log(msg string) error
Log reports an informational log from the entity.
func (*EntityStream) Start ¶
func (w *EntityStream) Start(outDir string) error
Start reports that the test has started. It should be called exactly once.
type Stream ¶
type Stream interface { // EntityStart reports that an entity has started. EntityStart(ei *protocol.Entity, outDir string) error // EntityLog reports an informational log message. EntityLog(ei *protocol.Entity, msg string) error // EntityError reports an error from an entity. An entity that reported one or more errors should be considered failure. EntityError(ei *protocol.Entity, e *protocol.Error) error // EntityEnd reports that an entity has ended. If skipReasons is not empty it is considered skipped. EntityEnd(ei *protocol.Entity, skipReasons []string, timingLog *timing.Log) error // ExternalEvent reports events happened in external bundles. ExternalEvent(res *protocol.RunTestsResponse) error // StackOperation reports stack operation request. StackOperation(ctx context.Context, req *protocol.StackOperationRequest) (*protocol.StackOperationResponse, error) }
Stream is an interface to report streamed outputs of multiple entity runs. Note that testing.Stream is for a single entity in contrast.
Directories ¶
Path | Synopsis |
---|---|
Package outputtest provides functionalities for unit testing output package.
|
Package outputtest provides functionalities for unit testing output package. |