From e175bb0faf0cdd06e568ebf867fb54b0eb04b197 Mon Sep 17 00:00:00 2001 From: prudhvi-maddineni <111352154+prudhvi-maddineni@users.noreply.github.com> Date: Mon, 26 Jun 2023 14:04:00 +0100 Subject: [PATCH] Update README.md (#719) * Update README.md --- README.md | 86 +++++++++++++++++++++++++++-------- config/owasp/suppressions.xml | 4 ++ 2 files changed, 71 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index bcee8b91..ba9f64fd 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,84 @@ # rd-profile-sync + +## Purpose + Scheduled sync job between IDAM and User Profile -### Running unit tests tests: +Architecture and Designs : -If you have some time to spare, you can run the *unit tests* as follows: +Profile Sync Low Level Design. Please refer to the confluence +https://tools.hmcts.net/confluence/display/RTRD/Profile+Sync+API+-+Low+Level+Design + +Profile Sync API High Level Design. Please refer to the confluence +https://tools.hmcts.net/confluence/display/RTRD/Profile+Sync+-+High+Level+Design + + +### Prerequisites + +To run the project you will need to have the following installed: + +* Java 17 +* Docker + +For information about the software versions used to build this API and a complete list of it's dependencies see build.gradle + +While not essential, it is highly recommended to use the pre-push git hook included in this repository to ensure that all tests are passing. This can be done by running the following command: +`$ git config core.hooksPath .githooks` + +### Environment Vars + +If running locally for development or testing you will need to set the following environment variables + +* export REDIRECT-URI= +* export AUTHORIZATION= +* export client-authorization= +* export totp_secret= + + +### Running the application + +Please Make sure you are connected to the VPN before running application +(https://portal.platform.hmcts.net/vdesk/webtop.eui?webtop=/Common/webtop_full&webtop_type=webtop_full) + +To run the API quickly use the docker helper script as follows: ``` -./gradlew test +./bin/run-in-docker.sh install +``` +or + +``` +docker-compose up ``` -### Running mutation tests tests: -If you have some time to spare, you can run the *mutation tests* as follows: +After, you can start the application from the current source files using Gradle as follows: ``` -./gradlew pitest +./gradlew clean bootRun ``` -As the project grows, these tests will take longer and longer to execute but are useful indicators of the quality of the test suite. -More information about mutation testing can be found here: -http://pitest.org/ +### Running integration tests: -### Contract testing with pact +You can run the *integration tests* as follows: + +``` +./gradlew integration +``` + + +### Running unit tests tests: + +If you have some time to spare, you can run the *unit tests* as follows: + +``` +./gradlew test +``` + +### Contract testing with pact + To generate the json inside target/pacts directory you need to run the tests first. This file is not committed to the repo. @@ -50,13 +105,6 @@ The pact contract(s) should be published Remember to return the localhost back to the remote broker -### 'No tasks available' when running Pact tests -`Step 1: Go to where you can edit configurations for the tests here..` -![pact1](readme-images/pact1.png?raw=true "Step 1") - -`Step 2: Press the plus to add a new Junit test class...` -![pact2](readme-images/pact2.png?raw=true "Step 2") - -`Step 3: Then setup the configuration like so, making sure the path to the test class is correct..` -![pact3](readme-images/pact3.png?raw=true "Step 3") +for more information, Please refer to the confluence on how to run and publish PACT tests. +https://tools.hmcts.net/confluence/display/RTRD/PACT+testing diff --git a/config/owasp/suppressions.xml b/config/owasp/suppressions.xml index 9808867a..04c654b3 100644 --- a/config/owasp/suppressions.xml +++ b/config/owasp/suppressions.xml @@ -50,4 +50,8 @@ file name: launchdarkly-java-server-sdk-5.10.2.jar (shaded: org.yaml:snakeyaml:1 ^pkg:maven/org\.yaml/snakeyaml@.*$ CVE-2022-1471 + + Temporary suppression for Spring Boot versions please remove it once cve is fixed + CVE-2023-20883 +