Right now, in order to run the bats tests, developers have to manually start vault (with -dev and -dev-root-token-id "root") and then run make bats.
When we write tests for #16, some tests will require having two instances of vault running, so the process will require even more steps.
I think we should modify the make bats target so that it does all the required setup/teardown automatically (and the logic should probably be moved to a bash script).
The script should do something like this:
Update the git submodules
Start two instances of vault in dev mode
with -dev-root-token-id "root"
listening on non-default ports to avoid clashing with the developer's own instance (e.g. 8210 and 8220).
Run bats
Kill both vault instances regardless of whether the tests succeeded or failed
Acceptance criteria
The make bats target automatically spins up and kills the necessary vault instances.
If a user already has an instance running on the default port 8200, make bats does not interfere with that.
Clarification and motivation
Right now, in order to run the
bats
tests, developers have to manually start vault (with-dev
and-dev-root-token-id "root"
) and then runmake bats
.When we write tests for #16, some tests will require having two instances of
vault
running, so the process will require even more steps.I think we should modify the
make bats
target so that it does all the required setup/teardown automatically (and the logic should probably be moved to a bash script).The script should do something like this:
vault
in dev mode-dev-root-token-id "root"
bats
Acceptance criteria
make bats
target automatically spins up and kills the necessary vault instances.make bats
does not interfere with that.