dummy-ms aims to be a simple micro-service which can simulate a variety of scenarios such as:
- Timeouts
- Computer misbehave, like:
- Excessive memory consumption
- Excessive CPU consumption
- Excessive network consumption
- etc
By having a middleware capable of such things we could easily test our infrastructure knowing how it will react when a component of a business case misbehave.
Well, of course this is also a pet project so we could learn Golang best practices 😉
Please follow the below instructions to safely prepare your environment for development
- Install Go
- Checkout the repository
- Have fun
To run the unit tests and generate the coverage report (html), navigate to the project's root folder and execute go test -cover -coverprofile=coverage.out ./... && go tool cover -html=coverage.out
- Configure your Visual Studio Code so you can be able to debug the code locally.
- Check if your code passes on the checks of Effective Go
- Configure your Visual Studio Code to execute
go build
,go fmt
andgolint
on save
- Configure your Visual Studio Code to execute
Well, I rather allow the tests to be our live documentation, so BDD makes it easier by having a better description of what is happening. ginko and gomega allow us to have better description through human readable test description and matchers (evaluations) and deliver great development capabilities with amazing assertions and nice tooling for TDD, such as $ ginko watch
.
- https://github.com/bxcodec/go-clean-arch
- https://github.com/rosenhouse/counter-demo
- https://medium.com/@zach_4342/dependency-injection-in-golang-e587c69478a8
- https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html
- https://github.com/cevatbarisyilmaz/lossy (network degradation tool)