* [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>
Boundary CLI Tests
This directory contains bats tests for testing the Boundary CLI against arbitrary Boundary deployments.
The tests are meant to mimic common workflows such as creating resources, and connecting to targets. Currently, the tests rely heavily on
generated resources when running Boundary in dev mode. In the future, we hope to remove this dependency and generate all resources through
the Boundary CLI from the outset.
The tests are designed to be idempotent.
Getting Started
Dependencies
Running Tests
- Start boundary in dev mode
boundary dev
or direct the tests towards an existing install by setting
export BOUNDARY_ADDR=<your_install>
- Run the tests
# for an untagged non-version of boundary
bats -p boundary/
# for an official boundary version
IS_VERSION=true bats -p boundary/
Running Tests Against Other Deployments
You can run this suite against an arbitrary cluster by overriding the following env vars:
DEFAULT_LOGIN=<my_login> \
DEFAULT_PASSWORD=<my_password> \
BOUNDARY_ADDR=http://boundary-test-controller-salmon-b70f2710539143b4.elb.us-east-1.amazonaws.com:9200 \
bats boundary/
~> Note that these tests currently expect generated resources to exist. Failure to run against a Boundary deployment that does not have generated resources will result in a lot of test failures. Future work includes breaking thses tests out in a way that makes them not dependant on generated resources.