GoBank -- Go client for the awesome, over-the-wire test double Mountebank.
THIS PROJECT IS CURRENTLY UNDER DEVELOPMENT.
ALTHOUGH MOST OF THE HTTP IMPOSTER FUNCTIONALITY IS COVERED, THE FLUENT API MIGHT CHANGE.
PLEASE CHECK AGAIN LATER...
$ go get github.com/durmaze/gobank
See Go Doc or Go Walker for usage and details.
TODO Add Travis Build Status, Go coverage, GoDoc, License, etc.
GoBank makes things simple if you'd like to use Mountebank in your tests. As recommended by Mountebank, you're better off creating and deleting your imposters in your test lifecycle (i.e. setup and teardown hooks).
GoBank provides a Go API, which directly maps to Mountebank's REST API.
With GoBank, you can simply create an Imposter via a Fluent API,
// build an Imposter
imposter := NewImposterBuilder().Protocol("http").Port(4546).Build()
and then, you can publish your imposter to Mountebank.
// publish your Imposter to Mountebank
client := mountebank.NewClient(MountebankUri)
client.CreateImposter(imposter)
If you want to contribute, feel free to send me a pull request with testing.
Currently, only HTTP imposters are supported. Any contributions on HTTPS, SMTP and TCP are more than welcome.
Thanks to all contributors thus far: @alperkose
GoBank is MIT License.