test

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package test contains test related mage targets.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GoBuildTags used when running all tests.
	GoBuildTags = []string{componentTestTag, integrationTestTag}

	// TestArgs used in test targets.
	TestArgs = []string{
		"test",
		"-mod=vendor",
		"-cover",
		"-race",
		"-shuffle=on",
	}
	// CoverArgs used in coverage targets.
	CoverArgs = []string{
		"test",
		"-mod=vendor",
		"-coverpkg=./...",
		"-covermode=atomic",
		"-coverprofile=coverage.txt",
		"-race",
		"-shuffle=on",
	}
	// Pkgs is the pkg pattern to target.
	Pkgs = "./..."
	// CoverExcludePatterns is a list of pkg patterns to prune from coverage.txt
	CoverExcludePatterns = []string{"proto/generated"}
	// CoverExcludeFile is the coverage file to prune.
	CoverExcludeFile = "coverage.txt"
)

Functions

This section is empty.

Types

type Test

type Test mg.Namespace

Test groups together test related tasks.

func (Test) All

func (Test) All() error

All runs all tests.

func (Test) Cleanup added in v0.9.4

func (Test) Cleanup() error

Cleanup removes any local resources created by `mage test:all`.

func (Test) Component added in v0.16.0

func (Test) Component() error

Component runs unit and component tests.

func (Test) CoverAll added in v0.12.3

func (Test) CoverAll() error

CoverAll runs all tests and produces a coverage report.

func (Test) CoverUnit added in v0.12.3

func (Test) CoverUnit() error

CoverUnit runs unit tests and produces a coverage report.

func (Test) Integration added in v0.16.0

func (Test) Integration() error

Integration runs unit and integration tests.

func (Test) Unit

func (Test) Unit() error

Unit runs unit tests.

Jump to

Keyboard shortcuts

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