* [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>
28 lines
554 B
Bash
28 lines
554 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
function retry {
|
|
local retries=$1
|
|
shift
|
|
local count=0
|
|
|
|
until "$@"; do
|
|
exit=$?
|
|
wait=$((2 ** count))
|
|
count=$((count + 1))
|
|
|
|
if [ "$count" -lt "$retries" ]; then
|
|
sleep "$wait"
|
|
else
|
|
return "$exit"
|
|
fi
|
|
done
|
|
|
|
return 0
|
|
}
|
|
|
|
# make sure the ALB is up and passing healthchecks
|
|
retry 10 curl -s -o /dev/null ${BOUNDARY_ADDR}
|
|
|
|
${BOUNDARY_PATH}/boundary authenticate password -auth-method-id=${METHOD_ID} -login-name=${LOGIN_NAME} -password=${PASSWORD} -token-name=none -format=json -keyring-type=none
|