Files
threshold/internal/tests/cli/boundary/_helpers.bash
T
9169c6bacb [QTI-220] Add infrastructure integration testing (#2282)
* [QTI-275] Add infrastructure integration testing

On pull requests that originate from branches of the `hashicorp/boundary`
repo, we now conditionally dispatch infrastructure integration tests using
the Enos framework. The `integration` Enos scenario includes two `builder`
variants which allow developers or CI to deploy a Boundary cluster in AWS
using either a local `boundary` install bundle or that which is produced
in the `build` workflow for CRT. The `test` variants determine which type
of infrastructure integration test to run. At present those options are
`cli_ui` (Bats CLI tests) or `smoke` (creates target instances and a
target host catalog and verifies that `boundary` works).

In addition to the new workflow and quality scenarios, we simplified the
some `build` workflow steps and added Go module caching to speed up the
build pipeline.

See the [enos/README.md](https://github.com/hashicorp/boundary/blob/main/enos/README.md)
for a detailed explanation on how to configure and execute Enos scenarios
from your machine.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Rebecca Willett <rwillett@hashicorp.com>
Co-authored-by: Josh Branch <jbrand@hashicorp.com>
2022-07-28 14:48:51 -06:00

35 lines
1.1 KiB
Bash

export BOUNDARY_ADDR="${BOUNDARY_ADDR:-http://127.0.0.1:9200}"
export DEFAULT_PASSWORD="${DEFAULT_PASSWORD:-password}"
export DEFAULT_LOGIN="${DEFAULT_LOGIN:-admin}"
export DEFAULT_UNPRIVILEGED_LOGIN="${DEFAULT_UNPRIVILEGED_LOGIN:-user}"
export DEFAULT_AMPW="${DEFAULT_AMPW:-ampw_1234567890}"
export DEFAULT_P_ID="${DEFAULT_P_ID:-p_1234567890}"
export DEFAULT_O_ID="${DEFAULT_O_ID:-o_1234567890}"
export DEFAULT_GLOBAL='global'
export DEFAULT_TARGET="${DEFAULT_TARGET:-ttcp_1234567890}"
export DEFAULT_HOST_SET="${DEFAULT_HOST_SET:-hsst_1234567890}"
export DEFAULT_HOST_CATALOG="${DEFAULT_HOST_CATALOG:-hcst_1234567890}"
export DEFAULT_HOST="${DEFAULT_HOST:-hst_1234567890}"
export DEFAULT_USER="${DEFAULT_USER:-u_1234567890}"
export DEFAULT_UNPRIVILEGED_USER="${DEFAULT_UNPRIVILEGED_USER:-u_0987654321}"
export SKIP_FAILING_TESTS_IN_CI="${SKIP_FAILING_TESTS_IN_CI:-false}"
function strip() {
echo "$1" | tr -d '"'
}
function strip_all() {
echo "$1" | tr -d '"' | tr -d '\'\'
}
function has_status_code() {
local json=$1
local code=$2
if [ echo "$json"|jq -c ".status_code == $code" ]; then
return 1
fi
}
diag() {
echo "$@" | sed -e 's/^/# /' >&3 ;
}