Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitCode = "ExitCode" Stdout = "Stdout" Stderr = "Stderr" LineCount = "LineCount" )
Constants for defining the various tested properties
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandResult ¶
type CommandResult struct {
Status ResultStatus
Stdout string
Stderr string
ExitCode int
FailureProperties []string
Error error
}
CommandResult holds the result for a specific test
type CommandUnderTest ¶
CommandUnderTest represents the command under test
type Expected ¶
type Expected struct {
Stdout ExpectedOut
Stderr ExpectedOut
LineCount int
ExitCode int
}
Expected is the expected output of the command under test
type ExpectedOut ¶
type ResultStatus ¶
type ResultStatus int
ResultStatus represents the status code of a test result
const ( Success ResultStatus = iota Failed Skipped )
Result status codes
type TestCase ¶
type TestCase struct {
Title string
Command CommandUnderTest
Expected Expected
Result CommandResult
}
TestCase represents a test case which will be executed by the runtime
type TestResult ¶
type TestResult struct {
TestCase TestCase
ValidationResult ValidationResult
FailedProperty string
}
CommandResult represents the TestCase and the ValidationResult
func Validate ¶
func Validate(test TestCase) TestResult
Validate validates the test results with the expected values
type ValidationResult ¶
ValidationResult will be returned after the validation was executed
Click to show internal directories.
Click to hide internal directories.