For usage and documentation, see the wiki.
Get the Source Code
This project uses a version of Go supporting modules, which means you can clone the repository anywhere you want. It also handles dependencies without need of secondary tooling such as Glide.
git clone email@example.com:testdouble/diplomat.git cd diplomat
# Mac OSX with Homebrew brew install go
# Mac OSX with Homebrew brew install bats-core
In order to develop on this repository, you'll also need to install Docker.
By default, we use a Docker image version of
httpbin to make requests for the
bats tests. If you prefer not to use Docker, change the value of
test/helpers/helpers.bash to point to
Watch Code and Run Tests
The core development script in
This script uses
rg --files | entr -rc to watch the code, and run several other
make scripts on update. Those scripts can also be run on a one-off basis, if desired (see
watch script provides a general-purpose, fast feedback cycle for development, which encourages making small changes and keeping tests green.
The unit tests in this repository use
testify to generate mocks for each
type in the project. These mock files live in
mocks, are checked into source control, and should not be manually updated.
If you add or modify any
types, you will need to regenerate the mocks.
Code of Conduct
This project follows Test Double's code of conduct for all community interactions, including (but not limited to) one-on-one communications, public posts/comments, code reviews, pull requests, and GitHub issues. If violations occur, Test Double will take any action they deem appropriate for the infraction, up to and including blocking a user from the organization's repositories.