Skip to content

Commit 9558dd5

Browse files
authored
feat(CB2-19673): update test error email address (#162)
* feat(CB2-19673): update test error email address * feat: upgrade to java 21 * feat: bump handlebars
1 parent 8507a9d commit 9558dd5

File tree

15 files changed

+71
-50
lines changed

15 files changed

+71
-50
lines changed

.github/workflows/build_hash.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ jobs:
1111
secrets:
1212
CVS_MGMT_AWS_ROLE: ${{ secrets.CVS_MGMT_AWS_ROLE }}
1313
DVSA_AWS_REGION: ${{ secrets.DVSA_AWS_REGION }}
14-

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
security:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v6
1111
- name: Run Snyk to check for vulnerabilities
1212
uses: snyk/actions/gradle-jdk11@master
1313
with:
1414
args: '--all-projects'
1515
env:
16-
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
16+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.github/workflows/pr-plan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
pull-requests: write
1515
runs-on: X64
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
1818
- uses: aws-actions/configure-aws-credentials@v4
1919
with:
2020
role-to-assume: ${{ secrets.CVS_MGMT_AWS_ROLE }}
@@ -31,4 +31,4 @@ jobs:
3131
-Dsonar.token=${{ env.SONARQUBE_GHA_TOKEN }} \
3232
-Dsonar.login=${{ env.SONARQUBE_GHA_TOKEN }} \
3333
-Dsonar.projectName=${{ github.repository }} \
34-
-Dsonar.projectVersion=1.0.${{ github.run_id }}
34+
-Dsonar.projectVersion=1.0.${{ github.run_id }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ You will need to install the following DVSA packages to make sure you have the s
88

99
- [git-secrets](https://github.com/awslabs/git-secrets)
1010
- [repo-security-scanner](https://github.com/UKHomeOffice/repo-security-scanner)
11+
- Java 21
1112

1213
## Installation:
1314

@@ -32,3 +33,7 @@ Debugging Applications:
3233
### Architeture
3334

3435
Documentation for this service can be found [here](https://wiki.dvsacloud.uk/display/MP/Document+Generation+Service+Contract).
36+
37+
### Unit tests
38+
39+
To execute the unit tests, run: `./gradlew clean test`

build.gradle

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
buildscript {
2-
repositories {
3-
mavenCentral()
4-
}
5-
dependencies {
6-
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0'
7-
}
8-
}
9-
101
plugins {
11-
id 'com.adarshr.test-logger' version '1.1.2'
12-
id 'com.github.johnrengelman.shadow' version '5.1.0'
13-
id 'org.ajoberstar.grgit' version '2.2.1'
14-
id 'org.sonarqube' version '3.0'
2+
id 'com.adarshr.test-logger' version '4.0.0'
3+
id 'com.github.johnrengelman.shadow' version '8.1.1'
4+
id 'org.ajoberstar.grgit' version '5.2.1'
5+
id 'org.sonarqube' version '4.4.1.3373'
156
}
167

178
apply plugin: 'java'
@@ -36,21 +27,43 @@ version "${version}"
3627

3728
mainClassName = "uk.dvsa.mot.PdfGenerator"
3829

39-
sourceCompatibility = 11
30+
java {
31+
toolchain {
32+
languageVersion = JavaLanguageVersion.of(21)
33+
}
34+
}
35+
36+
jacoco {
37+
toolVersion = "0.8.11"
38+
}
4039

4140
jacocoTestReport {
4241
group = "Reporting"
4342
reports {
44-
xml.enabled true
45-
csv.enabled false
46-
html.destination file("${buildDir}/reports/coverage")
43+
xml.required = true
44+
csv.required = false
45+
html.outputLocation = file("${buildDir}/reports/coverage")
4746
// html.destination file("./reports/coverage")
4847
}
4948
}
5049

5150

5251
testlogger {
5352
theme 'mocha'
53+
showExceptions true
54+
showStackTraces true
55+
showFullStackTraces false
56+
showCauses true
57+
slowThreshold 2000
58+
showSummary true
59+
showSimpleNames false
60+
showPassed true
61+
showSkipped true
62+
showFailed true
63+
showStandardStreams false
64+
showPassedStandardStreams false
65+
showSkippedStandardStreams false
66+
showFailedStandardStreams true
5467
}
5568

5669
idea {
@@ -65,28 +78,28 @@ repositories {
6578
}
6679

6780
dependencies {
68-
compile group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.1.0'
69-
compile group: "com.github.jknack", name: "handlebars", version: "4.2.0"
70-
compile group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf-openpdf', version: '9.1.20'
71-
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.0'
72-
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.15.0'
73-
compile group: 'com.amazonaws', name: 'aws-lambda-java-log4j2', version: '1.5.1'
74-
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.22.1'
75-
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.22.1'
76-
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.22.1'
77-
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
78-
compile fileTree(dir: 'jars', include: '*.jar')
79-
testCompile group: 'junit', name: 'junit', version: '4.13.1'
80-
testCompile group: 'org.jsoup', name: 'jsoup', version: '1.15.3'
81-
testCompile group: 'commons-io', name: 'commons-io', version: '2.14.0'
82-
testCompile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.12'
81+
implementation group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.1.0'
82+
implementation group: "com.github.jknack", name: "handlebars", version: "4.5.0"
83+
implementation group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf-openpdf', version: '9.1.20'
84+
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.15.0'
85+
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.15.0'
86+
implementation group: 'com.amazonaws', name: 'aws-lambda-java-log4j2', version: '1.5.1'
87+
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.22.1'
88+
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.22.1'
89+
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.22.1'
90+
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
91+
implementation fileTree(dir: 'jars', include: '*.jar')
92+
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
93+
testImplementation group: 'org.jsoup', name: 'jsoup', version: '1.15.3'
94+
testImplementation group: 'commons-io', name: 'commons-io', version: '2.14.0'
95+
testImplementation group: 'com.itextpdf', name: 'itextpdf', version: '5.5.12'
8396
}
8497

8598
task buildZip(type: Zip) {
8699
from compileJava
87100
from processResources
88101
into('lib') {
89-
from configurations.runtime
102+
from configurations.runtimeClasspath
90103
}
91104
}
92105

@@ -106,5 +119,9 @@ tasks.test {
106119
environment "LAMBDA_TASK_ROOT", "./src/main/resources"
107120
}
108121

122+
tasks.compileTestJava {
123+
dependsOn buildManifest
124+
}
125+
109126
buildZip.dependsOn buildManifest
110127
build.dependsOn buildZip
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/resources/views/CommercialVehicles/VTG30.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@
371371
<p class="test-information__message">
372372
If any of the details are not correct, please contact DVSA by email at <br/><a
373373
class="test-information__message-link"
374-
href="mailto:test.errors@dvsa.gov.uk">test.errors@dvsa.gov.uk</a> or by telephone on 0300 1239000.
374+
href="mailto:MYVT@dvsa.gov.uk">MYVT@dvsa.gov.uk</a> or by telephone on 0300 1239000.
375375
</p>
376376
<p class="test-information__message">
377377
Find out about the vehicle’s MOT history at <a class="test-information__message-link"

src/main/resources/views/CommercialVehicles/VTG30Welsh.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@
369369
<p class="test-information__message">
370370
Os nad yw unrhyw un o’r manylion yn gywir, cysylltwch â DVSA drwy e-bost ar <br/><a
371371
class="test-information__message-link"
372-
href="mailto:test.errors@dvsa.gov.uk">test.errors@dvsa.gov.uk</a> neu drwy ffôn ar 0300 1239000.
372+
href="mailto:MYVT@dvsa.gov.uk">MYVT@dvsa.gov.uk</a> neu drwy ffôn ar 0300 1239000.
373373
</p>
374374
<p class="test-information__message">
375375
Dysgwch am hanes MOT y cerbyd ar wefan <a class="test-information__message-link"

src/main/resources/views/CommercialVehicles/fail.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
<p class="test-information__message">
349349
If any of the details are not correct, please contact DVSA by email at <br/><a
350350
class="test-information__message-link"
351-
href="mailto:test.errors@dvsa.gov.uk">test.errors@dvsa.gov.uk</a> or by telephone on 0300 1239000.
351+
href="mailto:MYVT@dvsa.gov.uk">MYVT@dvsa.gov.uk</a> or by telephone on 0300 1239000.
352352
</p>
353353
<p class="test-information__message">
354354
Receive a free annual MOT reminder by subscribing<br/> at <a class="test-information__message-link"

src/main/resources/views/CommercialVehicles/failWelsh.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@
346346
<p class="test-information__message">
347347
Os nad yw unrhyw un o’r manylion yn gywir, cysylltwch â DVSA drwy e-bost ar <br/><a
348348
class="test-information__message-link"
349-
href="mailto:test.errors@dvsa.gov.uk">test.errors@dvsa.gov.uk</a> neu drwy ffôn ar 0300 1239000.
349+
href="mailto:MYVT@dvsa.gov.uk">MYVT@dvsa.gov.uk</a> neu drwy ffôn ar 0300 1239000.
350350
</p>
351351
<p class="test-information__message">
352352
Derbynnwch nodyn atgoffa MOT blynyddol am ddim trwy danysgrifio

0 commit comments

Comments
 (0)