testutil

package
v0.0.0-...-e25005f Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

View Source
const PatchId = "58d156352cfeb61064cf08b3"

Variables

This section is empty.

Functions

func AddTestIndexes

func AddTestIndexes(collection string, unique, sparse bool, key ...string) error

AddTestIndexes adds indexes in a given collection for testing.

func CleanupAPITestData

func CleanupAPITestData() error

func CreateTestLocalConfig

func CreateTestLocalConfig(testSettings *evergreen.Settings, projectName, projectPath string) error

Creates a project ref local config that can be used for testing, with the string identifier given and the local config from a path

func SetupPatches

func SetupPatches(patchMode PatchTestMode, b *build.Build, patches ...PatchRequest) (*patch.Patch, error)

Types

type PatchRequest

type PatchRequest struct {
	ModuleName string
	FilePath   string
	Githash    string
}

type PatchTestMode

type PatchTestMode int
const (
	NoPatch PatchTestMode = iota
	InlinePatch
	ExternalPatch
	MergePatch
)

func (PatchTestMode) String

func (m PatchTestMode) String() string

type TestModelData

type TestModelData struct {
	Task       *task.Task
	Build      *build.Build
	Host       *host.Host
	Project    *model.Project
	ProjectRef *model.ProjectRef
}

func SetupAPITestData

func SetupAPITestData(testConfig *evergreen.Settings, taskDisplayName string, variant string, projectFile string, patchMode PatchTestMode) (*TestModelData, error)

Jump to

Keyboard shortcuts

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