Enos is an quality testing framework that allows composing and executing quality
requirement scenarios as code. For Boundary, it is currently used to perform
infrastructure integration testing using the artifacts that are created as part
of the CRT build pipeline. While intended to be executed via Github Actions using
the results of the `build` workflow, scenarios are executable from a developer
machine that has the requisite dependencies and configuration.
Refer to the [enos documentation](https://github.com/hashicorp/Enos-Docs)
for further information regarding installation, execution or composing Enos scenarios.
## Requirements
* AWS access. HashiCorp Boundary developers should use Doormat.
* Terraform >= 1.0
* Enos >= v0.0.10. You can [install it from a release channel](https://github.com/hashicorp/Enos-Docs/blob/main/installation.md) or use `make tools` install it into `$GOBIN`.
* Access to the QTI org in Terraform Cloud. HashiCorp Boundary developers can
access this token in 1Password or request their own in #team-quality on slack.
* An SSH keypair in the AWS region you wish to run the scenario. You can use
doormat to login to the AWS console to create or upload an existing keypair.
* Boundary installed locally. `make install` will put it in `$GOPATH/bin`, which
you can use with the `local_boundary_dir` variable, e.g.
`local_boundary_dir = /Users/<user>/.go/bin`.
* For the Bats CLI UI scenarios, you'll need `bats`, `jq` and a valid keychain
configured. Windows and macOS will use the system keychains by default. If
you're using Linux it will default to [pass](https://www.passwordstore.org/).
## Scenarios Variables
In CI, each scenario is executed via Github Actions and has been configured using
environment variable inputs that follow the `ENOS_VAR_varname` pattern.
For local execution you can specify all the required variables using environment
variables, or you can update `enos.vars.hcl` with values and uncomment the lines.
Variables that are required:
-`tfc_api_token`
-`aws_ssh_private_key_path`
-`aws_ssh_keypair_name`
-`enos_user`
-`local_boundary_dir`
If you want to use the `builder:crt` variant to simulate execution in CI you'll
also need to specify `crt_bundle_path` to a local boundary install bundle.
If you want to modify which port the ALB listens on to proxy controller API
requests, you can specify the `alb_listener_api_port`.
See [enos.vars.hcl](./enos.vars.hcl) for complete descriptions of each variable.
## Executing Scenarios
From the `enos` directory:
```bash
# list all available scenarios
enos scenario list
# run the cli_ui scenario with an artifact that is built locally. Make sure
# the local machine has been configured for the cli_ui scenario as detailed in
# the requirements section. This will execute the scenario and clean up any
# resources if successful.
enos scenario run integration builder:local test:cli_ui
# launch an individual scenario but leave infrastructure up after execution