testutil

package
v0.0.0-...-a9abf63 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestDir      = "config_test"
	TestSettings = "evg_settings.yml"
)
View Source
const EnvOverride = "SETTINGS_OVERRIDE"

Variables

View Source
var ExecutionEnvironmentType = "production"

Functions

func ConfigureIntegrationTest

func ConfigureIntegrationTest(t *testing.T, testSettings *evergreen.Settings, testName string)

func DisablePermissionsForTests

func DisablePermissionsForTests()

func EnablePermissionsForTests

func EnablePermissionsForTests()

func GetDirectoryOfFile

func GetDirectoryOfFile() string

GetDirectoryOfFile returns the path to of the file that calling this function. Use this to ensure that references to testdata and other file system locations in tests are not dependent on the working directory of the "go test" invocation.

func MockConfig

func MockConfig() *evergreen.Settings

func NewEnvironment

func NewEnvironment(ctx context.Context, t *testing.T) evergreen.Environment

func NewGithubPR

func NewGithubPR(prNumber int, baseRepoName, headRepoName, headHash, user, title string) *github.PullRequest

func Setup

func Setup()

func TestConfig

func TestConfig() *evergreen.Settings

TestConfig creates test settings from a test config.

func TestConfigWithDefaultAuthTokens

func TestConfigWithDefaultAuthTokens() *evergreen.Settings

Types

This section is empty.

Jump to

Keyboard shortcuts

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