Documentation
¶
Overview ¶
Package flake marks an instance of testing.TB(https://pkg.go.dev/testing#TB) as flake. Use flake.Mark to mark a known flake test. Use `skip-flake` to control the behavior, or set the environment variable `SKIP_FLAKE`. Flags take precedence over environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasFlakyTestMarker ¶ added in v0.56.0
HasFlakyTestMarker returns whether the output string contains the flaky test indicator
func Mark ¶
Mark test as a known flaky. If any of skip-flake flag or GO_TEST_SKIP_FLAKE environment variable is set, the test will be skipped. Otherwise test will be marked as known flake through a special message on tests output.
func MarkOnLog ¶ added in v0.64.0
MarkOnLog marks the test as flaky when the 'text' log is found, if you need to use regex see MarkOnLogRegex
func MarkOnLogRegex ¶ added in v0.66.0
MarkOnLogRegex marks the test as flaky when the `pattern` regular expression is found in its logs.
Types ¶
type KnownFlakyTests ¶ added in v0.56.0
type KnownFlakyTests struct {
// contains filtered or unexported fields
}
KnownFlakyTests is data about which tests should ignore failures, because they are flaky
func Parse ¶ added in v0.56.0
func Parse(r io.Reader) (*KnownFlakyTests, error)
Parse parses the reader in the flake.yaml format
func (*KnownFlakyTests) Add ¶ added in v0.56.0
func (k *KnownFlakyTests) Add(pkg string, testName string)
Add adds a flaky test to the list of known flaky tests