internal

package
v0.0.0-...-c8ce297 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTaskStatusAndLogs

func CheckTaskStatusAndLogs(ctx context.Context, t *testing.T, params APIParams, client *http.Client, mode globals.Mode, tasks []string)

CheckTaskStatusAndLogs checks that all the expected tasks are finished, succeeded, and performed the expected operations based on the task log contents.

func MakeSmokeRequest

func MakeSmokeRequest(ctx context.Context, params APIParams, method string, client *http.Client, url string) ([]byte, error)

MakeSmokeRequest sends an authenticated smoke request to the smoke test app server.

func SmokeRunBinary

func SmokeRunBinary(ctx context.Context, name, wd, bin string, cmdParts ...string) (jasper.Process, error)

SmokeRunBinary runs a smoke test Evergreen binary in the background. The name indicates the process name so that it can be tracked in output logs. The given wd is used as the working directory for the command.

func StartAgent

func StartAgent(ctx context.Context, t *testing.T, params APIParams, mode globals.Mode, execModeID, execModeSecret string) jasper.Process

StartAgent starts the smoke test agent with the given execution mode and ID.

func StartAppServer

func StartAppServer(ctx context.Context, t *testing.T, params APIParams) jasper.Process

StartAppServer starts the smoke test app server.

func WaitForEvergreen

func WaitForEvergreen(t *testing.T, appServerURL string, client *http.Client)

WaitForEvergreen waits for the Evergreen app server to be up and accepting requests.

Types

type APIParams

type APIParams struct {
	// EVGHome is the local directory containing the Evergreen repo.
	EVGHome string
	// CLIPath is the path to the CLI executable.
	CLIPath string
	// AppServerURL is the URL where the smoke test app server is set up.
	AppServerURL string
	// AppConfigPath is the path to the file containing the app server admin
	// settings.
	AppConfigPath string
	// Username is the name of the user to make authenticated requests.
	Username string
	// APIKey is the API key associated with the user to make authenticated
	// requests.
	APIKey string
}

APIParams includes information necessary to set up a smoke test app server and make authenticated requests to it.

func GetAPIParamsFromEnv

func GetAPIParamsFromEnv(t *testing.T, evgHome string) APIParams

GetAPIParamsFromEnv gets the parameters for the smoke test necessary to make API requests to the app server from the environment. It sets defaults where possible. Note that the default data depends on the setup test data for the smoke test.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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