Skip to content

Commit

Permalink
RIA-8828 Merge from master (#875)
Browse files Browse the repository at this point in the history
* DIAC-281 fixing CcdScenarioRunnerTest (#846)

* DIAC-281 fixing CcdScenarioRunnerTest

* Revert "DIAC-281 fixing CcdScenarioRunnerTest"

This reverts commit 3f8f88c.

* DIAC-281 fixing CcdScenarioRunnerTest

* Update all non-major dependencies (#847)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* VUL-5809 Upgrade serenity, restAssured, remove springHystrix reference (#848)

* Update all non-major dependencies (#851)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#853)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#854)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* VUL-5808 Remove passoword from docker-compose.yml (#850)

* Update plugin org.owasp.dependencycheck to v9.0.10 (#855)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies to v4.1.4 (#856)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency org.projectlombok:lombok to v1.18.32 (#859)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#860)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#863)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies to v4.6.8 (#864)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency commons-io:commons-io to v2.16.0 (#865)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* DIAC-123 cdam download change fix (#806)

* DIAC-123 trying cdam download auth change

* DIAC-123 trying cdam download auth change

* DIAC-123 trying cdam download auth change

* DIAC-123

* DIAC-123 removing logging

---------

Co-authored-by: KleoG <[email protected]>

* RIA-8726 - Merge SNL (BAILS) - > Master (DO NOT MERGE) (#841)

* RIA-7973
* RIA-7973 Updated Bail application details template

* RIA-7973 Added Bail FT scenarios pattern

* RIA-7973 Fixed Ft

* RIA-8119
* RIA-8119 Bail application document changes with added interpreter fields

* RIA-8364
* RIA-8364 Bail template change 01134 -> 01144

* RIA-8489
* RIA-8489 Refactored interpreter language

* RIA-8410 RIA-8409 Generate and store hearing notice on case (initial listing and relisting)

* RIA-8410: Generate hearing documents

- Create Handler, Template and configuration classes to generate notice of hearing for case relisting

* RIA-8409: Generate hearing documents

- Create handler, template and configuration classes to generate notice of hearing for initial listing event

* RIA-8410: Some code refactoring

* RIA-8508
* RIA-8508 Fix appeals refactored interpreter language

* RIA-8507
* RIA-8507 Fix the field type for fcs_has_passport in BailCaseFieldDefinition

* RIA-8554
* RIA-8554 Fix detention location on hearing-notice template

* RIA-8554
* RIA-8554 Using enums for Field definition comparison

* Update BailSubmissionTemplateProvider.java

* RIA-8738: IMA - Rebasing docmosis template (#845)

* Updates to fix build failure

* RIA-8773: Add missing hearing centres in the hearing location to hearing address mapping document (#858)

* RIA-8773 Fix rebasing of CcdScenarioRunnerTest

* RIA-8774 Add logging (#862)

* RIA-8774 Add logging

* RIA-8770 Run functional tests on pipeline

* RIA-8774 Enable logging on functional tests

* RIA-8774 Enable logging on functional tests

* Update DocumentTagTest.java

---------

Co-authored-by: Marcellofabbri <[email protected]>
Co-authored-by: Augustine Onubeze <[email protected]>
Co-authored-by: Marcello Fabbri <[email protected]>

* Fix unit test

---------

Co-authored-by: Nilay <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marcello Fabbri <[email protected]>
Co-authored-by: KleoG <[email protected]>
Co-authored-by: rajeshthuraiyur <[email protected]>
Co-authored-by: Marcellofabbri <[email protected]>
Co-authored-by: Augustine Onubeze <[email protected]>
  • Loading branch information
8 people authored Apr 23, 2024
1 parent ea46fa3 commit 6941ada
Show file tree
Hide file tree
Showing 52 changed files with 1,706 additions and 232 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# renovate: datasource=github-releases depName=microsoft/ApplicationInsights-Java
ARG APP_INSIGHTS_AGENT_VERSION=3.5.0
ARG APP_INSIGHTS_AGENT_VERSION=3.5.1
# Application image
FROM hmctspublic.azurecr.io/base/java:17-distroless

Expand Down
4 changes: 3 additions & 1 deletion Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def secrets = [
secret('system-password', 'SYSTEM_PASSWORD'),
secret('customer-services-telephone', 'IA_CUSTOMER_SERVICES_TELEPHONE'),
secret('customer-services-email', 'IA_CUSTOMER_SERVICES_EMAIL'),
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL')
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL'),

secret('generic-docker-pact-broker-password', 'GENERIC_DOCKER_PACT_BROKER_YAML_PASS')
]
]

Expand Down
4 changes: 3 additions & 1 deletion Jenkinsfile_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def secrets = [

secret('customer-services-telephone', 'IA_CUSTOMER_SERVICES_TELEPHONE'),
secret('customer-services-email', 'IA_CUSTOMER_SERVICES_EMAIL'),
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL')
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL'),

secret('generic-docker-pact-broker-password', 'GENERIC_DOCKER_PACT_BROKER_YAML_PASS')
]
]

Expand Down
4 changes: 3 additions & 1 deletion Jenkinsfile_parameterized
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ def secrets = [

secret('customer-services-telephone', 'IA_CUSTOMER_SERVICES_TELEPHONE'),
secret('customer-services-email', 'IA_CUSTOMER_SERVICES_EMAIL'),
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL')
secret('gov-call-charges-url', 'IA_BAIL_GOV_CALL_CHARGES_URL'),

secret('generic-docker-pact-broker-password', 'GENERIC_DOCKER_PACT_BROKER_YAML_PASS')
]
]

Expand Down
38 changes: 20 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ plugins {
id 'com.github.ben-manes.versions' version '0.51.0'
id "info.solidsoft.pitest" version '1.15.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.owasp.dependencycheck' version '9.0.9'
id 'org.owasp.dependencycheck' version '9.0.10'
id 'org.sonarqube' version '3.5.0.2730'
id 'org.springframework.boot' version '2.7.18'
id 'uk.gov.hmcts.java' version '0.12.57'
id 'au.com.dius.pact' version '4.6.7'
id 'uk.gov.hmcts.java' version '0.12.59'
id 'au.com.dius.pact' version '4.6.8'
id "io.freefair.lombok" version "6.6.3"
}

Expand All @@ -36,12 +36,11 @@ def versions = [
pitest : '1.15.8',
reformLogging : '5.1.7',
reformHealthStarter: '0.0.5',
restAssured : '5.3.2',
serenity : '3.9.8',
restAssured : '5.4.0',
serenity : '4.1.4',
sonarPitest : '0.5',
springHystrix : '2.2.10.RELEASE',
pact_version : '4.1.38',
springDoc : '1.7.0',
springDoc : '1.8.0',
springCloud : '3.1.9'
]

Expand Down Expand Up @@ -144,7 +143,7 @@ idea {
configurations {
integrationTestCompile.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
functionalTestCompile.extendsFrom testImplementation
functionalTestImplementation.extendsFrom testImplementation
contractTestImplementation.extendsFrom testImplementation
functionalTestRuntime.extendsFrom testRuntime
}
Expand Down Expand Up @@ -181,6 +180,9 @@ task functional(type: Test, description: 'Runs the functional tests.', group: 'V
finalizedBy aggregate
testLogging {
showStackTraces = true
showStandardStreams = true
showCauses = true
showExceptions = true
}
}

Expand Down Expand Up @@ -276,18 +278,18 @@ dependencyManagement {
}


dependencySet(group: 'com.fasterxml.jackson.core', version: '2.16.1') {
dependencySet(group: 'com.fasterxml.jackson.core', version: '2.17.0') {
entry 'jackson-databind'
entry 'jackson-core'
entry 'jackson-annotations'
}

dependencySet(group: 'com.fasterxml.jackson.dataformat', version: '2.16.1') {
dependencySet(group: 'com.fasterxml.jackson.dataformat', version: '2.17.0') {
entry 'jackson-dataformat-yaml'
entry 'jackson-dataformat-csv'
}

dependencySet(group: 'com.fasterxml.jackson.datatype', version: '2.16.1') {
dependencySet(group: 'com.fasterxml.jackson.datatype', version: '2.17.0') {
entry 'jackson-datatype-jsr310'
entry 'jackson-datatype-jdk8'
}
Expand Down Expand Up @@ -326,7 +328,7 @@ dependencies {
implementation group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '9.37.3'

// CVE-2021-27568
implementation group: 'net.minidev', name: 'json-smart', version: '2.5.0'
implementation group: 'net.minidev', name: 'json-smart', version: '2.5.1'

implementation group: 'org.springframework.boot', name: 'spring-boot-starter-cache'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core'
Expand All @@ -349,19 +351,19 @@ dependencies {
implementation group: 'uk.gov.hmcts.reform', name: 'properties-volume-spring-boot-starter', version: '0.1.0'

implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
implementation group: 'commons-io', name: 'commons-io', version: '2.15.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.16.0'

implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.14'

implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.86'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '9.0.86'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.87'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '9.0.87'

implementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '6.3.0'
implementation group: 'com.github.hmcts', name: 'ccd-case-document-am-client', version: '1.7.3'
implementation group: 'com.google.guava', name: 'guava', version: '32.1.3-jre'

annotationProcessor 'org.projectlombok:lombok:1.18.30'
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
compileOnly 'org.projectlombok:lombok:1.18.32'

testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.12.4'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
Expand Down Expand Up @@ -391,7 +393,7 @@ dependencies {
}

//pact contract testing
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'junit5', version: "4.6.7"
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'junit5', version: "4.6.8"

contractTestImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
contractTestRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.2")
Expand Down
4 changes: 2 additions & 2 deletions charts/ia-case-documents-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v2
name: ia-case-documents-api
home: https://github.com/hmcts/ia-case-documents-api
version: 0.0.38
version: 0.0.39
description: Immigration & Asylum Case Documents Service
maintainers:
- name: HMCTS Immigration & Asylum Team
email: [email protected]
dependencies:
- name: java
version: 5.0.4
version: 5.2.0
repository: https://hmctspublic.azurecr.io/helm/v1/repo/
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ networks:
- "80:80"
environment:
PACT_BROKER_DATABASE_USERNAME: postgres
PACT_BROKER_DATABASE_PASSWORD: password
PACT_BROKER_DATABASE_PASSWORD: ${GENERIC_DOCKER_PACT_BROKER_YAML_PASS}
PACT_BROKER_DATABASE_HOST: postgres
PACT_BROKER_DATABASE_NAME: postgres
PACT_BROKER_WEBHOOK_SCHEME_WHITELIST: http
2 changes: 1 addition & 1 deletion infrastructure/.terraform-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.4
1.7.5
2 changes: 1 addition & 1 deletion infrastructure/state.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.94.0"
version = "~> 3.97.0"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
import io.restassured.http.Headers;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
Expand Down Expand Up @@ -84,8 +89,8 @@ public void scenarios_should_behave_as_specified() throws IOException {
}

assertFalse(
"Verifiers are configured",
verifiers.isEmpty()
"Verifiers are configured",
verifiers.isEmpty()
);

String scenarioPattern = System.getProperty("scenario");
Expand All @@ -104,6 +109,7 @@ public void scenarios_should_behave_as_specified() throws IOException {
System.out.println((char) 27 + "[33m" + "RUNNING " + scenarioSources.size() + " SCENARIOS");
System.out.println((char) 27 + "[36m" + "-------------------------------------------------------------------");

List<String> runScenarios = new ArrayList<>();
int maxRetries = 3;
for (String scenarioSource : scenarioSources) {
String description = "";
Expand Down Expand Up @@ -183,6 +189,7 @@ public void scenarios_should_behave_as_specified() throws IOException {
actualResponse
)
);
runScenarios.add(description);
break;
} catch (Error | RetryableException e) {
System.out.println("Scenario failed with error " + e.getMessage());
Expand All @@ -194,6 +201,10 @@ public void scenarios_should_behave_as_specified() throws IOException {
}
}

System.out.println((char) 27 + "[36m" + "-------------------------------------------------------------------");
List<String> scenariosThatHaveRun = runScenarios.stream().distinct().toList();
System.out.println((char) 27 + "[" + scenariosThatHaveRun.size() + " SCENARIOS HAVE RUN]");
System.out.println(String.join(";\n", scenariosThatHaveRun));
System.out.println((char) 27 + "[36m" + "-------------------------------------------------------------------");
if (!haveAllPassed) {
throw new AssertionError("Not all scenarios passed.\nFailed scenarios are:\n" + failedScenarios.stream().map(Object::toString).collect(Collectors.joining(";\n")));
Expand Down Expand Up @@ -358,4 +369,4 @@ private Headers getAuthorizationHeaders(Map<String, Object> scenario) {

return new Headers();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"applicationSubmissionDocument": [
"tribunalDocumentsWithMetadata": [
{
"id": "1",
"value": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"applicationSubmissionDocument": [
"unsgnDecisionDocumentWithMetadata": [
{
"id": "1",
"value": {
"document": {
"document_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/",
"document_binary_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\/binary/",
"document_filename": "Smith-decision-notice-UNSIGNED.PDF"
"document_filename": "Smith-decision-notice-UNSIGNED.docx"
},
"description": "",
"dateUploaded": "{$TODAY}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"applicationSubmissionDocument": [
"unsgnDecisionDocumentWithMetadata": [
{
"id": "1",
"value": {
"document": {
"document_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/",
"document_binary_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\/binary/",
"document_filename": "Smith-decision-notice-UNSIGNED.PDF"
"document_filename": "Smith-decision-notice-UNSIGNED.docx"
},
"description": "",
"dateUploaded": "{$TODAY}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"applicationSubmissionDocument": [
"unsgnDecisionDocumentWithMetadata": [
{
"id": "1",
"value": {
"document": {
"document_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/",
"document_binary_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\/binary/",
"document_filename": "Smith-decision-notice-UNSIGNED.PDF"
"document_filename": "Smith-decision-notice-UNSIGNED.docx"
},
"description": "",
"dateUploaded": "{$TODAY}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"legalRepresentativeDocuments": []
"legalRepresentativeDocuments": [],
"legalRepFamilyName": "LegalRepFamilyName"
}
}
}
Expand All @@ -20,14 +21,15 @@
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"applicationSubmissionDocument": [
"legalRepFamilyName": "LegalRepFamilyName",
"applicantDocumentsWithMetadata": [
{
"id": "1",
"value": {
"document": {
"document_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/",
"document_binary_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\/binary/",
"document_filename": "Smith-bail-application-summary.PDF"
"document_filename": "Smith-bail-application-details.PDF"
},
"description": "",
"dateUploaded": "{$TODAY}",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"description": "RIA-8409 Bail hearing notice (initial listing)",
"request": {
"uri": "/bail/ccdAboutToSubmit",
"credentials": "AdminOfficer",
"input": {
"eventId": "caseListing",
"state": "applicationSubmitted",
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"listingEvent": "initialListing",
"listingLocation": "harmondsworth",
"listingHearingDate": "2024-01-30T10:30:00",
"customerServicesTelephone": "{$customerServices.telephoneNumber}",
"customerServicesEmail": "{$customerServices.emailAddress}"
}
}
}
},
"expectation": {
"status": 200,
"errors": [],
"caseData": {
"template": "minimal-bail-application-submitted.json",
"replacements": {
"listingEvent": "initialListing",
"listingLocation": "harmondsworth",
"listingHearingDate": "2024-01-30T10:30:00",
"customerServicesTelephone": "{$customerServices.telephoneNumber}",
"customerServicesEmail": "{$customerServices.emailAddress}",
"hearingDocuments": [
{
"id": "1",
"value": {
"document": {
"document_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/",
"document_binary_url": "$/http.+\/documents/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\/binary/",
"document_filename": "1650-6221-2061-5101-Smith-hearing-notice.PDF"
},
"description": "",
"dateUploaded": "{$TODAY}",
"tag": "bailNoticeOfHearing"
}
}
]
}
}
}
}
Loading

0 comments on commit 6941ada

Please sign in to comment.