flake

package
v0.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

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

func HasFlakyTestMarker(out string) bool

HasFlakyTestMarker returns whether the output string contains the flaky test indicator

func Mark

func Mark(t testing.TB)

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.

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

func (*KnownFlakyTests) IsFlaky added in v0.56.0

func (k *KnownFlakyTests) IsFlaky(pkg string, testName string) bool

IsFlaky returns whether the particular test, or its parents, is known as flaky

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL