Documentation
¶
Index ¶
Constants ¶
View Source
const (
InputFilePath = "/file.yaml"
)
Variables ¶
This section is empty.
Functions ¶
func CommonExcludedFileArgs ¶
func CommonExcludedFileArgs() []string
func TimeBubbleStartTime ¶
TimeBubbleStartTime returns the time bubble start time. It can be used in test data definitions.
Types ¶
type NewRootCmdFunc ¶
NewRootCmdFunc returns the root command for the cli and an output buffer which returns the output after command execution
type Test ¶
type Test[Response, RawObject any] struct { Name string NewRootCmd NewRootCmdFunc CmdArgs []string AssertExhaustiveArgs bool AssertExhaustiveExcludes []string // output format tests WantObject RawObject // for rawyaml / rawjson printer WantProtoObject proto.Message // for yaml / json printer WantTable *string // for table printer WantWideTable *string // for wide table printer WantMarkdown *string // for markdown printer WantTemplate *string // for template printer WantDefault *string // for default printer Template *string // for template printer WantErr error }
Test can be used to run a cmd test on different output formats. Tests are executed in a time bubble using syntest. At least one "Want" must be specified, otherwise TestCmd will fail.
Click to show internal directories.
Click to hide internal directories.