metadata

package
v0.0.0-...-0d7ca9c Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJUnitError

func NewJUnitError(inner error, systemOut string) error

NewJUnitError returns a simple instance of JUnitError wrapping systemOut

Types

type CustomJSON

type CustomJSON struct {
	// contains filtered or unexported fields
}

func NewCustomJSON

func NewCustomJSON(from io.Reader) (*CustomJSON, error)

func (*CustomJSON) Add

func (m *CustomJSON) Add(key, value string) error

func (*CustomJSON) Write

func (m *CustomJSON) Write(writer io.Writer) error

type JUnitError

type JUnitError interface {
	error
	// this should be the command output (stdout/stderr)
	SystemOut() string
}

JUnitError represents an error with extra metadata suitable for structured (JUnit.xml) output written by kubetest2 If this type is returned as an error by a Deployer, kubetest2 may write the metadata to the output junit_runner.xml

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer manages writing out kubetest2 metadata, namely JUnit

func NewWriter

func NewWriter(suiteName string, runnerOut io.Writer) *Writer

NewWriter constructs a new writer, the junit_runner.xml contents will be written to runnerOut, with the top level kubetest2 stages as metadata (Up, Down, etc.)

func (*Writer) Finish

func (w *Writer) Finish() error

Finish finalizes the metadata (time) and writes it out

func (*Writer) WrapStep

func (w *Writer) WrapStep(name string, doStep func() error) error

WrapStep executes doStep and captures the output to be written to the kubetest2 runner metadata. If doStep returns a JUnitError this metadata will be captured

Jump to

Keyboard shortcuts

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