e2e

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

README

boundary-e2e-tests

This test suite tests Boundary in an end-to-end setting using Enos to spin up the desired infrastructure and go test to perform user workflows.

Getting Started

Usage
Enos

Setup Enos as described here

enos scenario run e2e_{scenario} builder:local // runs and destroys infra

enos scenario launch e2e_{scenario} builder:local  // runs and keeps infra online
enos scenario output // displays any defined enos output

enos scenario destroy // destroys infra

Enos scenarios set up the infrastructure, set the appropriate environment variables, and run the selected tests. Folders in this directory correspond to an enos scenario (e.g. enos/enos-scenario-e2e-target.hcl runs tests in testing/e2e/target)

Local

Set the appropriate environment variables...

export BOUNDARY_ADDR=  # e.g. http://127.0.0.1:9200
export E2E_PASSWORD_AUTH_METHOD_ID=  # e.g. ampw_1234567890
export E2E_PASSWORD_ADMIN_LOGIN_NAME=  # e.g. "admin"
export E2E_PASSWORD_ADMIN_PASSWORD=  # e.g. "password"

# For e2e/target
export E2E_TARGET_IP=  # e.g. 192.168.0.1
export E2E_SSH_KEY_PATH=  # e.g. /Users/username/key.pem
export E2E_SSH_USER=  # e.g. ubuntu
export E2E_SSH_PORT=  # e.g. 22

Then, run...

go test github.com/hashicorp/boundary/testing/e2e/target // run target tests
go test ./target/ // run target tests if running from this directory
go test github.com/hashicorp/boundary/testing/e2e/target -v // verbose
go test github.com/hashicorp/boundary/testing/e2e/target -v -run '^TestCreateTargetApi$' // run a specific test

Documentation

Index

Constants

View Source
const EnvToCheckSkip = "E2E_PASSWORD_AUTH_METHOD_ID"

Variables

This section is empty.

Functions

func MaybeSkipTest

func MaybeSkipTest(t *testing.T)

Types

type CommandResult

type CommandResult struct {
	Stdout   []byte
	Stderr   []byte
	ExitCode int
	Err      error
}

CommandResult encapsulates the output from running an external command

func RunCommand

func RunCommand(name string, args ...string) *CommandResult

RunCommand executes external commands on the system. Returns the results of running the provided command. CommandResult is always valid even if there is an error.

Directories

Path Synopsis
Package boundary provides methods for commonly used boundary actions that are used in end-to-end tests.
Package boundary provides methods for commonly used boundary actions that are used in end-to-end tests.

Jump to

Keyboard shortcuts

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