Gin Tonic example project to test mocking libraries and an alternative to the existing REST framework for a oriented microservice architecture.
Encourage to do:
- Dependency injection
- Mocking libraries
- Build cycle with Docker which makes host OS environment agnostic.
- Unit testing following TDD principles
- SRP classes
[ X ] Simple health check with debug
[ X ] Make it configurable with YML
[ X ] Dockerize the service (User docker-compose & Healthchecks) (build, test, deploy)
[ ? ] Deploy documentation with Docker
- Having problems deploying it as webserver
[ X ] Mocking objects
[ X ] Integration tests with docker
- Ginkgo
[ ] Expose Swagger spec with docker and go
[ ] Concourse pipeline
[ ] Openshift cluster with the Application
[ ] Prometheus metrics within the microservice
- Build
docker-compose -f docker/build up
go build pkg/api/main/main.go
- Unit Tests
docker-compose -f docker/tests.yml up
go test -v $(glide novendor)
- Integration Tests
docker-compose -f docker/integration.yml up
go test -v $(glide novendor) --tags=integration
Go Tools specified within the awesome-go framework which help to integrate different parts of the dev cycle.
- Generate tests
ginkgo bootstrap
ginkgo generate controller
- Generate mocks (The mock targets should be interfaces, so encourage to enforce interfacing classes)
mockery -name=Stringer