Documentation ¶
Index ¶
- func ExpectNoDisruption(f *framework.Framework, tolerate float64, total time.Duration, ...)
- func FrameworkFlakef(f *framework.Framework, format string, options ...interface{})
- func GetDisruption(events monitor.EventIntervals, requiredLocator string) (time.Duration, []string)
- func RecordJUnit(f *framework.Framework, name string, fn func() error) error
- func RecordJUnitResult(f *framework.Framework, name string, duration time.Duration, failure string)
- func Run(f *framework.Framework, description, testname string, adapter TestData, ...)
- type TestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectNoDisruption ¶
func ExpectNoDisruption(f *framework.Framework, tolerate float64, total time.Duration, events monitor.EventIntervals, reason string)
ExpectNoDisruption fails if the sum of the duration of all events exceeds tolerate as a fraction ([0-1]) of total, reports a disruption flake if any disruption occurs, and uses reason to prefix the message. I.e. tolerate 0.1 of 10m total will fail if the sum of the intervals is greater than 1m, or report a flake if any interval is found.
func FrameworkFlakef ¶
FrameworkFlakef records a flake on the current framework.
func GetDisruption ¶
GetDisruption returns total duration of all error events and array of event description for printing. When requiredLocator is specified (non-empty), only events matching this locator are considered.
func RecordJUnit ¶
RecordJUnit will capture the result of invoking fn as either a passing or failing JUnit test that will be recorded alongside the current test with name. These methods only work in the context of a disruption test suite today and will not be reported as JUnit failures when used within normal ginkgo suties.
func RecordJUnitResult ¶
RecordJUnitResult will output a junit result within a disruption test with the given name, duration, and failure string. If the failure string is set, the test is considered to have failed, otherwise the test is considered to have passed. These methods only work in the context of a disruption test suite today and will not be reported as JUnit failures when used within normal ginkgo suties.
func Run ¶
func Run(f *framework.Framework, description, testname string, adapter TestData, invariants []upgrades.Test, fn func())
Run executes the provided fn in a test context, ensuring that invariants are preserved while the test is being executed. Description is used to populate the JUnit suite name, and testname is used to define the overall test that will be run.
Types ¶
type TestData ¶
type TestData struct { UpgradeType upgrades.UpgradeType UpgradeContext upgrades.UpgradeContext }
TestData is passed to the invariant tests executed during the upgrade. The default UpgradeType is MasterUpgrade.