Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureIntegrationTest(t *testing.T, testSettings *evergreen.Settings, testName string)
- func DisablePermissionsForTests()
- func EnablePermissionsForTests()
- func GetDirectoryOfFile() string
- func GetIntegrationFile(t *testing.T) *evergreen.Settings
- func MockConfig() *evergreen.Settings
- func NewEnvironment(ctx context.Context, t *testing.T) evergreen.Environment
- func NewGithubPR(prNumber int, ...) *github.PullRequest
- func Setup()
- func TestConfig() *evergreen.Settings
- func TestConfigWithDefaultAuthTokens() *evergreen.Settings
- func TestSpan(ctx context.Context, t *testing.T) context.Context
Constants ¶
View Source
const ( TestDir = "config_test" // TestSettings contains the default admin settings suitable for testing // that depends on the global environment. TestSettings = "evg_settings.yml" )
View Source
const (
EnvOverride = "SETTINGS_OVERRIDE"
)
Variables ¶
View Source
var ExecutionEnvironmentType = "production"
Functions ¶
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 GetIntegrationFile ¶
GetIntegrationFile returns an initialized evergreen.Settings struct. It will halt test execution if an override file was not provided, or if there was an error parsing the settings
func MockConfig ¶
func NewEnvironment ¶
func NewGithubPR ¶
func NewGithubPR(prNumber int, baseRepoName, baseHash, headRepoName, headHash, user, title string) *github.PullRequest
func TestConfig ¶
TestConfig creates test settings from a test config.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.