Files
threshold/internal/tests/cli
Johan Brandhorst-SatzkornandTimothy Messier 5dbcda512a Fix enos bats test errors (#2468)
* test(cli): Remove skips in CI for cli tests

* fix(enos): Fix enos bats tests

The tests still sometimes suffer from timing issues,
but I was able to run a successful run (setup, run, destroy)
of the tests from my machine at least once.

There were 2 issues:

- Some tests in groups.bats were hardcoding the default user id
- The default grants for a user in a project were missing
   the permission to connect to a target. We now add this
   explicitly.

Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2022-09-20 14:39:28 -04:00
..

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

  1. Start boundary in dev mode
boundary dev

or direct the tests towards an existing install by setting

export BOUNDARY_ADDR=<your_install>
  1. 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 dependent on generated resources.