skip

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

Skip

This package intends to make it easy to skip tests based on environment variables.

Common use-cases include:

  • Enabling/Disabling tests that require a database
  • Disabling long-running tests (like UAT or capacity tests) during the dev cycle

These use-cases can be achieved using build flags but I have found that that build flags are cumbersome and sometimes lead to broken code (as the compiler does not check the code unless that tag is used)

Documentation

Overview

Package skip please refer to README.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfNotSet

func IfNotSet(t Skipper, key string)

IfNotSet will skip the current test when the supplied environment variable is not set

Types

type Skipper

type Skipper interface {
	// Skip the current test
	Skip(args ...interface{})
}

Skipper is a subset of testing.T

Jump to

Keyboard shortcuts

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