func IsIntegrationTest() bool
func Only(e bool) bool
Only &&s the provided bool with isIntegrationTest to simplify writing logic that checks a bool only during integration test runs.
func ReportTestCases(f *framework.Framework, testPackage *TestPackage)
Process the result of each test case in a TestPackage as though it were a locally-run test
func Skip(steps ...framework.Step) framework.Step
Skip wraps the provided framework.Step function (intended to be a skipping function, like k8s.NeedsKustomizeKonfig), only running the skipping function if the test run is an integration test run, e.g.: Skip(k8s.NeedsKustomizeKonfig) will not skip the test if it isn't an integration test run, otherwise will execute k8s.NeedsKustomizeKonfig. Allows writing skippers which only make sense in the context of integration tests without nesting every function in checks for IsIntegrationTest()
▹ Example
func SkipIf(f *framework.Framework)
SkipIf skips a test if the current test run is an integration test
func SkipIfNot(f *framework.Framework)
SkipIfNot skips a test if the current test run is not an integration test
▹ Example
Parse JSON-formatted test results
type JSONTestResultsParser struct{}
func (p JSONTestResultsParser) ParseTestResults(logs io.Reader, packageName string) (*TestPackage, error)
Convert JSON-formatted test results to TestPackage Go struct
type TestCase struct { State string Output strings.Builder Duration *time.Duration }
type TestEvent struct { Time *time.Time // encodes as an RFC3339-format string Action string Package string Test string Elapsed *float64 // seconds Output string }
type TestPackage struct { Duration *time.Duration State string TestCases map[string]*TestCase PackageName string }
Interface to parse test results from various data formats into a Go struct
type TestResultsParser interface { ParseTestResults(logs io.Reader, packageName string) (*TestPackage, error) }