This is a demo of how java microservices can can be self-certified with a component level test suite of functional, integration and unit tests.
User Controller --> User Service --> Time Server Gateway --> api.sunrise-sunset.org
--> User DB Connector --> Postgres Database
- Install Docker Desktop or Docker Engine depending on your OS
- Make sure Docker daemon is running
- Make sure Java 11+ and Gradle 7.4+ is properly setup
- Make sure Docker is installed and running
- Execute following command to start the DB
docker run -d \
--name postgres-self-cert \
-e POSTGRES_PASSWORD=mysecretpassword \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-p 5432:5432 \
-v /Users/chandima/Dev/db:/var/lib/postgresql/data \
postgres
- Execute
./gradlew bootRun
to start service
- Make sure Docker installed and running
- Execute
./gradlew test