Documentation ¶
Index ¶
- func CheckTaskStatusAndLogs(ctx context.Context, t *testing.T, params APIParams, client *http.Client, ...)
- func MakeSmokeRequest(ctx context.Context, params APIParams, method string, client *http.Client, ...) ([]byte, error)
- func SmokeRunBinary(ctx context.Context, name, wd, bin string, cmdParts ...string) (jasper.Process, error)
- func StartAgent(ctx context.Context, t *testing.T, params APIParams, mode globals.Mode, ...) jasper.Process
- func StartAppServer(ctx context.Context, t *testing.T, params APIParams) jasper.Process
- func WaitForEvergreen(t *testing.T, appServerURL string, client *http.Client)
- type APIParams
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 ¶
StartAppServer starts the smoke test app server.
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 ¶
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.