Tribunals case api is a spring boot based application to create new appeals for the SSCS Appellants
For versions and complete list of dependencies see build.gradle
- Java 8
- Spring Boot
- Gradle
To build the project execute the following command:
./gradlew build
Run the application by executing:
./gradlew bootRun
Once the application running locally, please make sure
- Your local CCD is up and running with subscription id "7S9MxdSBpt"
- Set Environment variable TEST_URL to where your api is running For example: export TEST_URL=http://localhost:8080
- Execute ./gradlew --info smoke
Create the image of the application by executing the following command:
./gradlew installDist
Create docker image:
docker-compose build
Run the distribution by executing the following command:
docker-compose up
This will start the API container exposing the application's port
In order to test if the application is up, you can call its health endpoint:
curl http://localhost:8080/health
You should get a response similar to this:
{"status":"UP"}
To run all unit tests execute the following command:
./gradlew test
To run all mutation tests execute the following command:
./gradlew pitest
You can run contract or pact tests as follows:
./gradlew contract
You can then publish your pact tests locally by first running the pact docker-compose:
docker-compose -f docker-pactbroker-compose.yml up
and then using it to publish your tests:
./gradlew pactPublish
PRs that start with "Bump" won't have a preview environment. The decision was made after we realised that most the preview environments were created by Depandabot.