Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Spring Boot 3 #5391

Open
wants to merge 141 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 135 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
f7d2056
Upgrade spring boot to 2.7
jamesrferguson1 Mar 19, 2024
54fcd17
Fix UnsatisfiedDependencyException in test by lazy loading CompoundEv…
jamesrferguson1 Mar 19, 2024
3abbc15
Update version of Mockito.
jamesrferguson1 Mar 20, 2024
6c8b228
Fix tests failing because of use of extracting (change to doesNotCont…
jamesrferguson1 Mar 20, 2024
5037a63
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 20, 2024
b997a8d
Fix two more failing tests.
jamesrferguson1 Mar 21, 2024
3520bd0
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 21, 2024
2efda58
Fix check style.
jamesrferguson1 Mar 21, 2024
f288f0e
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 21, 2024
aae0961
Fixing more test failures
jamesrferguson1 Mar 21, 2024
6159d44
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 21, 2024
c85eae5
Fixing more test failures
jamesrferguson1 Mar 21, 2024
c1ec47a
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 21, 2024
a50d158
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 22, 2024
93eec27
Upgrade spring cloud version
jamesrferguson1 Mar 22, 2024
b72e96f
Merge branch 'DFPL-522' of https://github.com/hmcts/fpl-ccd-configura…
jamesrferguson1 Mar 22, 2024
ae18b67
Fix failing idam tests - update response from 204 to 200 as getUserDe…
jamesrferguson1 Mar 26, 2024
188c4a0
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 26, 2024
a06279b
Resolve CVE.
jamesrferguson1 Mar 26, 2024
ea4fa78
Add app insights connection string to preview values
jamesrferguson1 Mar 26, 2024
c1f4f3f
Upgrade java helm chart.
jamesrferguson1 Mar 27, 2024
28e95f2
Merge branch 'master' into DFPL-522
GauravChawlaMOJ Mar 27, 2024
581eb4a
Upgrade aac-manage-case-assignment helm chart.
jamesrferguson1 Mar 27, 2024
f9e0b58
Merge branch 'DFPL-522' of https://github.com/hmcts/fpl-ccd-configura…
jamesrferguson1 Mar 27, 2024
61e932a
UUpdate helm chart.
jamesrferguson1 Mar 27, 2024
f734568
UUpdate helm chart.
jamesrferguson1 Mar 27, 2024
bdfb5fe
Adding fix for springfox to application.yaml
jamesrferguson1 Mar 27, 2024
2051df8
Merge branch 'master' into DFPL-522
jamesrferguson1 Mar 28, 2024
da0997c
Remove swaggerfox
jamesrferguson1 Mar 28, 2024
17634b4
Remove swagger annotations.
jamesrferguson1 Mar 28, 2024
9b0f8a1
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 2, 2024
ae080a7
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 4, 2024
7045630
Merge branch 'master' into DFPL-522
GauravChawlaMOJ Apr 4, 2024
c0e51fc
Removing app insights addition.
jamesrferguson1 Apr 4, 2024
fd89216
Merge branch 'DFPL-522' of https://github.com/hmcts/fpl-ccd-configura…
jamesrferguson1 Apr 4, 2024
dc5b149
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 4, 2024
7c7b8f0
Removing a couple of empty files
jamesrferguson1 Apr 4, 2024
e06ab14
Merge branch 'DFPL-522' of https://github.com/hmcts/fpl-ccd-configura…
jamesrferguson1 Apr 4, 2024
c116a2d
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 8, 2024
b3f8008
Add logging for post url to debug e2e tests.
jamesrferguson1 Apr 9, 2024
d4e92ad
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 9, 2024
5873275
Remove / in urls
jamesrferguson1 Apr 9, 2024
5792f35
Merge branch 'DFPL-522' of https://github.com/hmcts/fpl-ccd-configura…
jamesrferguson1 Apr 9, 2024
788ce76
Remove / in urls
jamesrferguson1 Apr 9, 2024
21c1199
Revert "Remove / in urls"
jamesrferguson1 Apr 10, 2024
080af39
Revert "Remove / in urls"
jamesrferguson1 Apr 10, 2024
1ea4926
Remove / in urls
jamesrferguson1 Apr 10, 2024
0e84dcc
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 10, 2024
d0e350f
Merge branch 'master' into DFPL-522
jamesrferguson1 Apr 10, 2024
74ce14a
Removing a couple of unnecessary changes
jamesrferguson1 Apr 10, 2024
f3847a9
Move from javax to jakarta library.
jamesrferguson1 May 15, 2024
781f170
Upgrade checkstyle.xml
jamesrferguson1 May 15, 2024
0f448f3
Update spring boot and gradle dependencies
jamesrferguson1 May 15, 2024
0a25484
Update apache library and some more changes from javax to jakarta
jamesrferguson1 May 15, 2024
3515efa
Upgrade spring security to use new filter chain
jamesrferguson1 May 15, 2024
364d67e
Spring security upgrade further changes
jamesrferguson1 May 15, 2024
5566cb8
Update application yaml formatting.
jamesrferguson1 May 15, 2024
8891678
Update to use io.restassured.http.ContentType
jamesrferguson1 May 15, 2024
48316a6
Use of EnableCircuitBreaker no longer required
jamesrferguson1 May 15, 2024
9f1814f
Update to use ChronoZonedDateTime
jamesrferguson1 May 15, 2024
e983cdb
Update Application.java as @ComponentScan no longer required.
jamesrferguson1 May 15, 2024
f631dde
@ConstructorBinding no longer required.
jamesrferguson1 May 15, 2024
e217174
Update test to use @SpringBootTest instead of @WebMVCTest
jamesrferguson1 May 15, 2024
1bdaab1
Update RetryableException arguments for tests
jamesrferguson1 May 15, 2024
89dabf1
Fix @WebMVCTest tests by adding mock beans and @WithMockUser annotati…
jamesrferguson1 May 15, 2024
9dc178d
fix WebMvcTest base class for spring 3
chak-shing-lo-justice May 16, 2024
19956f5
Fix check style.
jamesrferguson1 May 17, 2024
b4d0097
add logback imports
jamesrferguson1 May 20, 2024
02fbe32
Upgrade fortify-client - needed to fix issue with conflicting definit…
jamesrferguson1 May 22, 2024
039a28f
Fix test failures.
jamesrferguson1 May 23, 2024
3447d56
Remove redundant @Qualifier for quality gate checks.
jamesrferguson1 May 23, 2024
3280a0c
Remove usused import.
jamesrferguson1 May 23, 2024
e298f0e
Add RD properties to fix failing pact tests.
jamesrferguson1 May 28, 2024
1c25bc8
Update main.tf to latest version on master
jamesrferguson1 May 28, 2024
2325e47
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 May 28, 2024
1876274
FIx StringUtils import
jamesrferguson1 May 29, 2024
ee21229
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 May 29, 2024
23ba4e7
Remove IsStateMigratable (already removed in master)
jamesrferguson1 May 29, 2024
0e39f7c
Merge branch 'DFPL-522-spring3' of https://github.com/hmcts/fpl-ccd-c…
jamesrferguson1 May 29, 2024
94bfed0
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 May 29, 2024
512e778
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 May 29, 2024
c55521d
Add reference to authorisation feign client.
jamesrferguson1 May 29, 2024
74ba7e0
Add idamclient to component scan and upgrade its version.
jamesrferguson1 May 29, 2024
fd3230c
Revert idam upgrade.
jamesrferguson1 May 29, 2024
462dbed
Add feign client path
jamesrferguson1 May 29, 2024
57a8bdc
Adding back @ComponentScan notification to check if this fixes pipeline.
jamesrferguson1 May 30, 2024
5bad4e5
Update list of base packages to scan.
jamesrferguson1 May 30, 2024
f0ff0d9
Fixing failing test
jamesrferguson1 May 30, 2024
ce1d60e
Update base packages for component scan
jamesrferguson1 May 30, 2024
5eb549c
Update base packages for component scan
jamesrferguson1 May 31, 2024
e74be00
Update base packages for component scan
jamesrferguson1 May 31, 2024
3fcef1d
Dummy commit.
jamesrferguson1 Jun 3, 2024
03e356a
Tidy up build.gradle
jamesrferguson1 Jun 10, 2024
d05b0e1
Add back dependency to fix security issue.
jamesrferguson1 Jun 10, 2024
ca19ea1
Add back dependency to fix missing JWTDecoder bean
jamesrferguson1 Jun 10, 2024
7853e02
Upgrade to latest cftlib version for spring boot 3 compatibility.
jamesrferguson1 Jun 11, 2024
7eb4f25
Exclude android json to avoid library conflict
jamesrferguson1 Jun 11, 2024
e74db43
Resolve issue with functional tests.
jamesrferguson1 Jun 13, 2024
b18ba5b
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jun 17, 2024
b53faca
Update to use jakarta rather than javax for Resource
jamesrferguson1 Jun 17, 2024
b3c5f46
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jun 18, 2024
ccf2869
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jun 19, 2024
10ee50d
Restore pdfbox version
jamesrferguson1 Jun 19, 2024
f9d6eeb
Upgrade flywaydb version
jamesrferguson1 Jun 21, 2024
cf85651
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jun 26, 2024
5a3ce92
Dummy change
jamesrferguson1 Jun 26, 2024
9b38331
Increase app insights agent version
jamesrferguson1 Jun 27, 2024
10b8de5
Increase app insights agent version
jamesrferguson1 Jun 27, 2024
5fccec0
Add app insights libraries
jamesrferguson1 Jun 27, 2024
d3819e6
Undo increase app insights agent
jamesrferguson1 Jun 28, 2024
1682bf3
Fix incorrect import for Map.of
jamesrferguson1 Jun 28, 2024
93dac04
Fix SC_OK dependency
jamesrferguson1 Jun 28, 2024
91754e3
Remove AppInsightsInstrumentationKey
jamesrferguson1 Jun 28, 2024
6f1a424
Add postgres package to see if that resolves pipeline issues.
jamesrferguson1 Jul 2, 2024
3cfa8d2
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jul 2, 2024
2691bdf
fix ManageHearingsControllerVacatedSubmittedTest
chak-shing-lo-justice Jul 3, 2024
4a75e06
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jul 3, 2024
58f6d9e
Add postres package for flyway.
jamesrferguson1 Jul 4, 2024
80d5417
Add version
jamesrferguson1 Jul 4, 2024
cee2a32
Remove alias for app-insights-connection-string as identical to depen…
jamesrferguson1 Jul 5, 2024
ded7c5f
Bumping chart version/ fixing aliases
hmcts-jenkins-d-to-i[bot] Jul 5, 2024
3aab79f
Dummy change to re-trigger pipeline.
jamesrferguson1 Jul 9, 2024
28ea8ac
Dummy change to re-trigger pipeline.
jamesrferguson1 Jul 10, 2024
6cabacb
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jul 10, 2024
4fe17f5
Re-add gradle version upgrade.
jamesrferguson1 Jul 10, 2024
39e54f7
Re-add gradle version upgrade.
jamesrferguson1 Jul 10, 2024
d4e6ed4
Revert "Re-add gradle version upgrade."
jamesrferguson1 Jul 11, 2024
0f62928
Revert increasing gradle version
jamesrferguson1 Jul 11, 2024
edc52fd
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Jul 16, 2024
03e194e
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Aug 6, 2024
bb3eede
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Aug 6, 2024
8644e25
Increase apache commons version in line with what's in prod.
jamesrferguson1 Aug 6, 2024
d315d38
Increase pitest version in line with what's in prod.
jamesrferguson1 Aug 6, 2024
1d4a313
Remove redundant csrf check in tests
jamesrferguson1 Aug 6, 2024
480d45d
Remove unused import
jamesrferguson1 Aug 6, 2024
9817db7
Remove null castings
jamesrferguson1 Aug 7, 2024
01e327b
Remove unused import
jamesrferguson1 Aug 7, 2024
27b1603
Fix checkstyle
jamesrferguson1 Aug 7, 2024
bbf1fe9
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Aug 23, 2024
5bf113c
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Sep 6, 2024
b059f25
Merge branch 'master' into DFPL-522-spring3
jamesrferguson1 Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="4"/>
<property name="allowedAbbreviations" value="HMCTS"/>
<property name="allowedAbbreviationLength" value="5"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/smoke_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const output = require('codeceptjs').output;
Feature('Smoke tests @smoke-tests @fixed');

Scenario(
'Sign in as local authority and create a case',
'Sign in as Local Authority and create a case',
async ({ I, caseListPage }) => {
output.print('Smoke test triggered');
output.print('Smoke test triggered NOW');
await I.goToPage(config.baseUrl, config.newSwanseaLocalAuthorityUserOne);
const caseName = `Smoke test case (${moment().format('YYYY-MM-DD HH:MM')})`;
const caseId = await I.createCaseSmokeTest(
Expand Down
95 changes: 49 additions & 46 deletions service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ plugins {
id 'checkstyle'
id 'jacoco'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.springframework.boot' version '2.7.18'
id 'org.springframework.boot' version '3.2.4'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'org.sonarqube' version '3.5.0.2730'
id 'org.sonarqube' version '5.0.0.4638'
id 'project-report'
id 'idea'
id 'info.solidsoft.pitest' version '1.15.0'
Expand Down Expand Up @@ -221,17 +221,17 @@ task highLevelDataSetup(type: JavaExec, description: 'High level data step mock

checkstyle {
maxWarnings = 0
toolVersion = "8.45.1"
toolVersion = "10.14.0"
// need to set configDirectory to rootDir otherwise submodule will use submodule/config/checkstyle
configDirectory.set(file("$rootDir/config/checkstyle"))
getConfigDirectory().set(new File(rootDir, 'config/checkstyle'))
}

jacocoTestReport {
executionData(test, integration)
reports {
xml.required = true
csv.required = false
xml.destination = file("${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml")
xml.getRequired().set(true)
csv.getRequired().set(false)
xml.outputLocation = file("${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml")
}
}

Expand Down Expand Up @@ -281,11 +281,13 @@ def versions = [
reformLogging : '5.1.7',
springBoot : springBoot.class.package.implementationVersion,
log4j : '2.23.1',
logbackVersion : '1.5.6',
jackson : '2.15.4',
pdfbox : '2.0.31',
mockito : '4.11.0',
serenity : '2.6.0',
mockito : '5.2.0',
serenity : '4.1.6',
pact_version : '4.1.7',
junit_jupiter : '5.7.1',
junit_jupiter : '5.10.2',
lombok : '1.18.32',
pitest : '1.15.0',
gradlePitest : '1.3.0',
Expand All @@ -300,64 +302,57 @@ dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-quartz'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
implementation group: 'org.springframework.retry', name: 'spring-retry'

implementation group: 'org.springframework.security', name: 'spring-security-oauth2-jose', version: '6.2.3'
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-resource-server', version: '6.2.3'

implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail'

implementation group: 'org.springframework.security', name: 'spring-security-config', version: '5.8.12'
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-resource-server', version: '5.8.12'
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-jose', version: '5.8.12'
implementation group: 'org.springframework.security', name: 'spring-security-core', version: '5.8.12'
implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.8.12'
implementation group: 'org.springframework.security', name: 'spring-security-web', version: '5.8.12'
implementation group: 'org.springframework.security', name: 'spring-security-oauth2-core', version: '5.8.12'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-logging', version: '2.7.18'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix', version: '2.2.10.RELEASE'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: versions.log4j
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: versions.log4j
implementation group: 'org.apache.pdfbox', name: 'pdfbox', version: versions.pdfbox
implementation group: 'org.bitbucket.b_c', name: 'jose4j', version: '0.9.6'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.13'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.13'
implementation group: 'org.apache.pdfbox', name: 'pdfbox', version: versions.pdfbox

implementation group: 'org.apache.commons', name: 'commons-text', version: '1.12.0'
implementation group: 'org.apache.commons', name: 'commons-csv', version: '1.11.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'

implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.1.8'

implementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '5.10.9'

implementation group: 'io.github.openfeign', name: 'feign-core', version: '11.10'
implementation group: 'org.yaml', name: 'snakeyaml', version: '2.2'
implementation group: 'org.postgresql', name: 'postgresql', version: '42.7.3'
implementation group: 'org.flywaydb', name: 'flyway-core', version: '8.5.13'
implementation group: 'org.flywaydb', name: 'flyway-core', version: '10.15.2'
implementation group: 'org.flywaydb', name: 'flyway-database-postgresql', version: '10.15.2'

implementation group: 'uk.gov.hmcts.reform', name: 'logging', version: versions.reformLogging
implementation group: 'uk.gov.hmcts.reform', name: 'logging-appinsights', version: versions.reformLogging
implementation group: 'commons-fileupload', name: 'commons-fileupload', version: '1.5'
implementation group: 'uk.gov.hmcts.reform', name: 'idam-client', version: '2.0.0'
implementation group: 'uk.gov.hmcts.reform', name: 'document-management-client', version: '7.0.0'
implementation group: 'com.github.hmcts', name: 'idam-java-client', version: '3.0.3'
implementation group: 'com.github.hmcts', name: 'document-management-client', version: '7.0.1'
implementation group: 'uk.gov.hmcts.reform', name: 'core-case-data-store-client', version: '4.7.6'
implementation group: 'uk.gov.hmcts.reform', name: 'service-auth-provider-client', version: '4.0.0'
implementation group: 'uk.gov.hmcts.reform.auth', name: 'auth-checker-lib', version: '2.1.4'
implementation group: 'com.github.hmcts', name: 'send-letter-client', version: '3.0.16'
implementation group: 'com.github.hmcts', name: 'auth-checker-lib', version: '3.0.0'
implementation group: 'com.github.hmcts', name: 'send-letter-client', version: '4.0.4'
implementation group: 'uk.gov.service.notify', name: 'notifications-java-client', version: '3.17.3-RELEASE'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '9.0.89'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.89'

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'
implementation group: 'commons-io', name: 'commons-io', version: '2.16.1'

implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
implementation group: 'com.google.guava', name: 'guava', version: '33.1.0-jre'

implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-joda', version: '2.17.1'

implementation group: 'net.minidev', name: 'json-smart', version: '2.5.1'
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: '6.1.4'

implementation group: 'org.springframework.boot', name: 'spring-boot-starter-mail'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: versions.log4j
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: versions.log4j
implementation group: 'ch.qos.logback', name: 'logback-classic', version: versions.logbackVersion
implementation group: 'ch.qos.logback', name: 'logback-core', version: versions.logbackVersion

implementation group: 'com.microsoft.azure', name: 'applicationinsights-core', version: '3.4.12'
implementation group: 'com.microsoft.azure', name: 'applicationinsights-web', version: '3.4.12'

implementation 'org.postgresql:postgresql:42.7.3'

testImplementation group: 'org.pitest', name: 'pitest', version: '1.16.1'
testImplementation group: 'info.solidsoft.gradle.pitest', name: 'gradle-pitest-plugin', version: '1.15.0'
Expand All @@ -382,15 +377,19 @@ dependencies {
testImplementation group: 'org.mockito', name: 'mockito-inline', version: versions.mockito

// Fortify client for Fortify scans
testImplementation 'com.github.hmcts:fortify-client:1.2.0:all'
testImplementation 'com.github.hmcts:fortify-client:1.4.1'

testImplementation 'org.springframework.boot:spring-boot-starter-test'

functionalTestImplementation group: 'net.serenity-bdd', name: 'serenity-core', version: versions.serenity
functionalTestImplementation group: 'net.serenity-bdd', name: 'serenity-junit', version: versions.serenity
functionalTestImplementation group: 'net.serenity-bdd', name: 'serenity-rest-assured', version: versions.serenity
functionalTestImplementation group: 'net.serenity-bdd', name: 'serenity-spring', version: versions.serenity
functionalTestImplementation group: 'io.rest-assured', name: 'rest-assured'
functionalTestImplementation group: 'net.javacrumbs.json-unit', name: 'json-unit-assertj', version: '3.2.7'
functionalTestCompileOnly group: 'org.projectlombok', name: 'lombok', version: versions.lombok
functionalTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok

functionalTestImplementation sourceSets.main.runtimeClasspath
functionalTestImplementation sourceSets.test.runtimeClasspath

Expand All @@ -409,11 +408,11 @@ dependencies {
contractTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: versions.junit_jupiter
contractTestRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: versions.junit_jupiter
contractTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: versions.junit_jupiter
contractTestRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.8.2'
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.5'
contractTestRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.10.2'
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: versions.jackson
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: versions.jackson
contractTestImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: versions.jackson
contractTestImplementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '4.1.1'
contractTestImplementation group: 'org.springframework.cloud', name: 'spring-cloud-netflix-ribbon', version: '2.2.10.RELEASE'
contractTestImplementation group: 'com.netflix.ribbon', name: 'ribbon-core', version: '2.7.18'
contractTestImplementation group: 'uk.gov.hmcts.reform', name: 'core-case-data-store-client', version: '4.7.6'
contractTestImplementation group: 'com.google.guava', name: 'guava', version: '30.1.1-jre'
}
Expand Down Expand Up @@ -454,7 +453,7 @@ pitest {

dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2021.0.9'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1'
}
}

Expand Down Expand Up @@ -507,3 +506,7 @@ bootWithCCD {
environment 'MANAGE_CASE_S2S_AUTHORISED_SERVICES', 'ccd_gw,xui_webapp,ccd_data,fpl_case_service'
}
}

configurations.all {
exclude group: 'com.vaadin.external.google', module: 'android-json'
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

@PactTestFor(providerName = "referenceData_organisationalExternalUsers", port = "8892")
@TestPropertySource(
properties = "rd_professional.api.url=localhost:8892")
properties = {"rd_professional.api.url=localhost:8892", "rd_judicial.api.url=localhost:8893",
"rd_staff.api.url=localhost:8894"})
public class ReferenceDataOrganisationalExternalUsersConsumerTest extends ReferenceDataConsumerTestBase {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

@PactTestFor(providerName = "referenceData_organisationalInternal", port = "8894")
@TestPropertySource(
properties = "rd_professional.api.url=localhost:8894")
properties = {"rd_professional.api.url=localhost:8894", "rd_judicial.api.url=localhost:8895",
"rd_staff.api.url=localhost:8896"})
public class ReferenceDataOrganisationalInternalUsersConsumerTest extends ReferenceDataConsumerTestBase {

@Pact(provider = "referenceData_organisationalInternal", consumer = "fpl_ccdConfiguration")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

@PactTestFor(providerName = "referenceData_professionalExternalUsers", port = "8892")
@TestPropertySource(
properties = "rd_professional.api.url=localhost:8892")
properties = {"rd_professional.api.url=localhost:8892", "rd_judicial.api.url=localhost:8893",
"rd_staff.api.url=localhost:8894"})
public class ReferenceDataProfessionalExternalUsersConsumerTest extends ReferenceDataConsumerTestBase {

private static final String USER_EMAIL = "UserEmail";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package uk.gov.hmcts.reform.fpl;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import uk.gov.hmcts.reform.fpl.enums.C29ActionsPermitted;
import uk.gov.hmcts.reform.fpl.enums.EnglandOffices;
import uk.gov.hmcts.reform.fpl.enums.PlacedUnderOrder;
Expand All @@ -15,8 +18,6 @@
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package uk.gov.hmcts.reform.fpl.model;

import lombok.Data;
import org.springframework.boot.context.properties.ConstructorBinding;

@Data
@ConstructorBinding
public class User {

private final String name;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package uk.gov.hmcts.reform.fpl.service;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.restassured.http.ContentType;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.serenitybdd.rest.SerenityRest;
Expand All @@ -19,7 +20,6 @@
import java.util.Optional;
import java.util.function.Predicate;

import static com.gargoylesoftware.htmlunit.util.MimeType.APPLICATION_JSON;
import static java.lang.String.format;
import static java.net.HttpURLConnection.HTTP_OK;
import static org.apache.commons.lang3.ObjectUtils.isNotEmpty;
Expand All @@ -45,7 +45,7 @@ public boolean hasCaseAccess(User user, CaseData caseData) {
int status = SerenityRest
.given()
.headers(authenticationService.getAuthorizationHeaders(user))
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.get("/testing-support/case/" + caseData.getId())
.thenReturn()
.statusCode();
Expand All @@ -64,7 +64,7 @@ public CaseData createCase(CaseData caseData, User user) {
CaseDetails caseDetails = SerenityRest
.given()
.headers(authenticationService.getAuthorizationHeaders(user))
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.body(Map.of())
.post("/testing-support/case/create")
.then()
Expand All @@ -81,7 +81,7 @@ public CaseData createCase(CaseData caseData, User user) {
if (populateData) {
SerenityRest
.given()
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.headers(authenticationService.getAuthorizationHeaders(user))
.body(Map.of("state", Optional.ofNullable(caseData.getState())
.map(State::getValue)
Expand All @@ -100,7 +100,7 @@ public CallbackResponse callback(CaseData caseData, User user, String callback)
AboutToStartOrSubmitCallbackResponse response = SerenityRest
.given()
.headers(authenticationService.getAuthorizationHeaders(user))
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.body(toCallbackRequest(caseData))
.post(callback)
.then()
Expand All @@ -122,7 +122,7 @@ public void submittedCallback(CaseData caseData, CaseData caseDataBefore, User u
SerenityRest
.given()
.headers(authenticationService.getAuthorizationHeaders(user))
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.body(toCallbackRequest(caseData, caseDataBefore))
.post(callback)
.then()
Expand All @@ -133,7 +133,7 @@ private CaseData getCase(Long id, User user) {
CaseDetails caseDetails = SerenityRest
.given()
.headers(authenticationService.getAuthorizationHeaders(user))
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.body(Map.of())
.get("/testing-support/case/" + id)
.then()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package uk.gov.hmcts.reform.fpl.service;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.restassured.http.ContentType;
import lombok.RequiredArgsConstructor;
import net.serenitybdd.rest.SerenityRest;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -11,7 +12,6 @@
import java.io.IOException;
import java.io.UncheckedIOException;

import static com.gargoylesoftware.htmlunit.util.MimeType.APPLICATION_JSON;
import static org.apache.commons.lang3.StringUtils.isEmpty;
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
Expand Down Expand Up @@ -40,7 +40,7 @@ public String executeScenario(Scenario scenario) {
.given()
.headers(authenticationService.getAuthorizationHeaders(testConfiguration.getUsers()
.get(scenario.getRequest().getUser())))
.contentType(APPLICATION_JSON)
.contentType(ContentType.JSON)
.body(scenario.getRequest().getDataAsString())
.post(scenario.getRequest().getUri())
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public abstract class AbstractCallbackTest extends AbstractTest {

private final String eventName;
private final String eventId;

protected static final long ASYNC_METHOD_CALL_TIMEOUT = 10000;

protected AbstractCallbackTest(String eventName) {
Expand Down
Loading
Loading