* refactor (controller): Use a grpc server for the grpc-gateway This starts a grpc server for the grpc-gateway. The new gateway server uses an in-memory listener which also supports "dialing", so the http proxy can connect to the in-memory listener. This change allows us to use all grpc server features and was in part motivated by a need for an interceptor of inbound requests. With that said, having a "proper" grpc server for the gateway will provide a lot more flexibility and capabilities moving forward. The request context will still be verified via middleware in the http proxy (see wrapHandlerWithCommonFuncs). This verified context will be serialized into a protobuf and sent along to the grpc-gateway via metadata where an interceptor will add the verified request info to the request's context (see requestCtxInterceptor). The interceptor will verify the serialized request info via a shared ticket with it's companion in-memory http proxy. FYI: the ticket is simply random base62 string (see db.NewPrivateId). This change also necessitated a minor change to services. We need to return an empty response instead of nil, nil when there are no errors and the response is empty. * refactor (handlers): Rename gRPC Gateway filter Originally, this was called an OutgoingInterceptor, which is an unfortunate name since it's not an interceptor. Now that we're refactoring the gateway stuff and have proper interceptors, renaming this should remove ambiguity * refactor: Rework how 204 with empty msg is handled Recent changes to grpc gateway has necessitated a change to how 204s are handled by the gateway * tests (bats): Check status codes for delete operations
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.