testing

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const EnvTestTags = "GO_TEST_TAGS"

Variables

This section is empty.

Functions

func FreePort added in v0.1.0

func FreePort(t *testing.T) string

FreePort returns a free port on localhost

func NewRSAKeys added in v0.1.0

func NewRSAKeys(t *testing.T) (public, private string)

func SkipTags added in v0.0.3

func SkipTags(tags ...tagx.Tag) bool

SkipTags returns true if the tag rules apply

func Tags

func Tags(t *testing.T, tags ...tagx.Tag)

Tags defines the tags that the test should run under.

For example:

func TestDemo(t *testing.T) {
  testing.Tags(t, tagx.Integration, tagx.Short)
}

Results being run with:

  • no tags
  • `GO_TEST_TAGS=fast`
  • `GO_TEST_TAGS=integration`
  • `GO_TEST_TAGS=fast,integration`

But would be skipped with:

  • `GO_TEST_TAGS=-fast`
  • `GO_TEST_TAGS=-integration`
  • `GO_TEST_TAGS=fast,-integration`

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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