doc(e2e): Add info for adding tests

pull/2527/head
Michael Li 3 years ago
parent 719200612d
commit f9dfd024ed

@ -79,3 +79,31 @@ one can be created. If a new package is created, a new enos scenario would also
Enos is comprised of scenarios, where a scenario is the environment you want the tests to operate
in. In one scenario, there may be a boundary cluster and a target. Another scenario might involve a
boundary cluster and a vault instance. Scenarios can be found in [boundary/enos](../../../enos/)
To run these tests in CI, the [enos-run.yml](../../../.github/workflows/enos-run.yml) github action
workflow must be updated to include the new scenario (see the `matrix`).
### Development
To assist with iterating on tests on enos launched infrastructure, you can perform the following...
Add the following snippet to print out environment variable information
```
# `c` is the output from `loadConfig()`
s, _ := json.MarshalIndent(c, "", "\t")
log.Printf("%s", s)
```
Launch an enos scenario
```
enos scenario launch e2e_{scenario} builder:local
enos scenario output
```
Take the printed environment variable information and export them into another terminal session
```
export BOUNDARY_ADDR=
export E2E_PASSWORD_AUTH_METHOD_ID=
...
```
Run your tests
```
go test -v {go package}
```

Loading…
Cancel
Save