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

SSCSSI-34: merge evidence share to tribunals api #3671

Merged
merged 68 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
0585bec
SSCSSI-34: Initial merge of es into tribs
ruban72 Mar 8, 2024
e4bcb14
SSCSSI-34: Initial merge of es into tribs
ruban72 Mar 8, 2024
f980de1
SSCSSI-34: Initial merge of es into tribs
ruban72 Mar 8, 2024
b2d68f1
Merge remote-tracking branch 'origin/SSCSSI-34-merge-es-to-tribs-api'…
ruban72 Mar 8, 2024
dfd9b5c
SSCSSI-34: Initial merge of es into tribs
ruban72 Mar 11, 2024
2eaa8ad
SSCSSI-34: Initial merge of es into tribs
ruban72 Mar 11, 2024
0678d11
SSCSSI-34: Initial merge of test es packages into tribs
ruban72 Mar 12, 2024
1d276d5
SSCSSI-34: Initial merge of test es packages into tribs
ruban72 Mar 12, 2024
de93dc1
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 13, 2024
45f496b
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 13, 2024
88a1eab
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 13, 2024
084d62b
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 13, 2024
7b76536
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 14, 2024
965ff96
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 15, 2024
bf337fd
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 15, 2024
36a407b
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 15, 2024
b67f1ea
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 15, 2024
77c5ac4
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 15, 2024
eed4999
SSCSSI-34: Fix OOM error in int tests
ruban72 Mar 15, 2024
3d75664
SSCSSI-34: Fix Sonar errors
ruban72 Mar 15, 2024
aee640a
SSCSSI-34: Tidy up pact tests
ruban72 Mar 15, 2024
3a966a4
SSCSSI-34: Enable JMS for evidenceshare
ruban72 Mar 15, 2024
df3f45b
SSCSSI-34: Enable JMS for evidenceshare
ruban72 Mar 15, 2024
baad0f1
SSCSSI-34: Enable JMS for evidenceshare
ruban72 Mar 15, 2024
9d5206e
SSCSSI-34: Enable JMS for evidenceshare
ruban72 Mar 15, 2024
9dea705
SSCSSI-34: Helm/Jenkins config for evidenceshare
ruban72 Mar 15, 2024
3ff6761
SSCSSI-34: Helm/Jenkins config for evidenceshare
ruban72 Mar 15, 2024
06ad77e
SSCSSI-34: remove evidence share from ccd preview chart
ruban72 Mar 15, 2024
0abe084
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 15, 2024
917b377
SSCSSI-34: reinstate evidence share from ccd preview chart
ruban72 Mar 18, 2024
70778be
Merge remote-tracking branch 'origin/SSCSSI-34-merge-es-to-tribs-api'…
ruban72 Mar 18, 2024
d60801d
SSCSSI-34: disable evidence share from ccd preview chart
ruban72 Mar 18, 2024
eb412ef
SSCSSI-34: revert infra changes for evidence share
ruban72 Mar 18, 2024
e5972be
SSCSSI-34: Create toplevel package for evidenceshare components
ruban72 Mar 18, 2024
66df339
SSCSSI-34: Create toplevel package for evidenceshare components
ruban72 Mar 18, 2024
a401cf4
SSCSSI-34: Create toplevel package for evidenceshare components
ruban72 Mar 18, 2024
98fc066
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 18, 2024
c98611b
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] Mar 18, 2024
e736dda
SSCSSI-34: Add logging to es handlers
ruban72 Mar 19, 2024
b2ca701
Merge remote-tracking branch 'origin/SSCSSI-34-merge-es-to-tribs-api'…
ruban72 Mar 19, 2024
80779f8
SSCSSI-34: Add logging to es handlers
ruban72 Mar 19, 2024
6d0468a
SSCSSI-34: Add logging to es handlers
ruban72 Mar 19, 2024
1819b7b
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] Mar 19, 2024
c89823a
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 21, 2024
cdb6b30
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] Mar 21, 2024
53862a0
SSCSSI-138: Merge from master
ruban72 Mar 22, 2024
59ccfb6
SSCSSI-138: Merge from master
ruban72 Mar 22, 2024
cad1d04
Merge remote-tracking branch 'origin/SSCSSI-34-merge-es-to-tribs-api'…
ruban72 Mar 22, 2024
6cc1904
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 22, 2024
d2356d6
SSCSSI-138: Make topic consumer conditional on property
ruban72 Mar 22, 2024
2b0c89e
Merge remote-tracking branch 'origin/SSCSSI-34-merge-es-to-tribs-api'…
ruban72 Mar 22, 2024
381d303
SSCSSI-138: Make topic consumer conditional on property
ruban72 Mar 25, 2024
80335b6
SSCSSI-138: Make topic consumer conditional on property
ruban72 Mar 25, 2024
5b8cdda
SSCSSI-34: Bypass evidence share in preview
ruban72 Mar 27, 2024
d0c9db7
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 27, 2024
7927b77
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] Mar 27, 2024
45f2f6b
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Mar 27, 2024
3057bd8
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Apr 3, 2024
2602cfa
SSCSSI-34: revert pr image of tya
ruban72 Apr 3, 2024
41db1ac
SSCSSI-34: evidenceshare folder for it tests
ruban72 Apr 3, 2024
5d64eed
SSCSSI-34: evidenceshare folder for it tests
ruban72 Apr 3, 2024
8ca505e
SSCSSI-34: S2201 suppress
ruban72 Apr 3, 2024
5f64fc2
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Apr 3, 2024
cdd7bce
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Apr 4, 2024
b0f81e8
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Apr 5, 2024
ac82435
Merge branch 'master' into SSCSSI-34-merge-es-to-tribs-api
ruban72 Apr 5, 2024
a384858
Merge branch 'SSCSSI-34-merge-es-to-tribs-api' of github.com:hmcts/ss…
ruban72 Apr 5, 2024
bd572c5
SSCSSI-34: set up bypass feature flag for release
ruban72 Apr 8, 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
9 changes: 8 additions & 1 deletion Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,24 @@ def secrets = [
'sscs-${env}' : [
secret('idam-api', 'IDAM_API_URL'),
secret('idam-oauth-user', 'IDAM_OAUTH2_CLIENT_ID'),
secret('ccd-api', 'CORE_CASE_DATA_API_URL'),
secret('idam-redirect', 'IDAM_OAUTH2_REDIRECT_URL'),
secret('idam-sscs-systemupdate-user', 'IDAM_SSCS_SYSTEMUPDATE_USER'),
secret('idam-sscs-systemupdate-password', 'IDAM_SSCS_SYSTEMUPDATE_PASSWORD'),
secret('idam-sscs-oauth2-client-secret', 'IDAM_OAUTH2_CLIENT_SECRET'),
secret('idam-s2s-api', 'IDAM_S2S_AUTH'),
secret('ccd-api', 'CORE_CASE_DATA_API_URL'),
secret('ccd-jid', 'CORE_CASE_DATA_JURISDICTION_ID'),
secret('ccd-tid', 'CORE_CASE_DATA_CASE_TYPE_ID'),
secret('sscs-s2s-secret', 'IDAM_S2S_AUTH_TOTP_SECRET'),
secret('s2s-micro', 'IDAM_S2S_AUTH_MICROSERVICE'),
secret('docmosis-endpoint', 'PDF_SERVICE_CONVERT_URL'),
secret('docmosis-api-key', 'PDF_SERVICE_ACCESS_KEY'),
secret('AppInsightsInstrumentationKey', 'APPINSIGHTS_INSTRUMENTATIONKEY'),
secret('robotics-email-from', 'ROBOTICS_EMAIL_FROM'),
secret('robotics-email-to', 'ROBOTICS_EMAIL_TO'),
secret('robotics-email-scottish-to', 'ROBOTICS_EMAIL_SCOTTISH_TO'),
secret('robotics-email-pip-ae-to', 'ROBOTICS_EMAIL_PIP_AE_TO'),
secret('AppInsightsInstrumentationKey', 'APPINSIGHTS_INSTRUMENTATIONKEY'),
],
's2s-${env}' : [
secret('microservicekey-ccd-gw', 'CCD_API_GATEWAY_S2S_SECRET'),
Expand Down
16 changes: 15 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ tasks.withType(Test) {
}

task integration(type: Test) {
jvmArgs = ['-Xms1024m', '-Xmx2048m']
nitinprabhuhmcts marked this conversation as resolved.
Show resolved Hide resolved
setTestClassesDirs(sourceSets.integrationTest.output.classesDirs)
setClasspath(sourceSets.integrationTest.runtimeClasspath)
}
Expand Down Expand Up @@ -208,10 +209,12 @@ sonarqube {
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.exclusions", "**/CreateCaseException.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/domain/**," +
"src/main/java/uk/gov/hmcts/reform/sscs/evidenceshare/domain/**," +
"src/main/java/uk/gov/hmcts/reform/sscs/TribunalsCaseApiApplication.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/email/Email.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/config/*," +
"src/main/java/uk/gov/hmcts/reform/sscs/model/**/*.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/evidenceshare/model/**/*.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/service/EvidenceUploadService.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/service/OnlineHearingService.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/service/pdf/data/EvidenceDescriptionPdfData.java," +
Expand All @@ -222,7 +225,10 @@ sonarqube {
"src/main/java/uk/gov/hmcts/reform/sscs/controllers/CreateCaseController.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/service/pdf/data/PdfData.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/writefinaldecision/esa/EsaWriteFinalDecisionMidEventValidationHandler.java," +
"src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/writefinaldecision/uc/UcWriteFinalDecisionMidEventValidationHandler.java"
"src/main/java/uk/gov/hmcts/reform/sscs/evidenceshare/config/**," +
"src/main/java/uk/gov/hmcts/reform/sscs/service/servicebus/messaging/**," +
"src/main/java/uk/gov/hmcts/reform/sscs/docmosis/domain/**," +
"src/main/java/uk/gov/hmcts/reform/sscs/docmosis/config/**,"
property "sonar.host.url", "https://sonar.reform.hmcts.net/"
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
Expand Down Expand Up @@ -342,6 +348,7 @@ dependencies {
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.3'

implementation group:'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
implementation group: 'org.springframework', name: 'spring-jms'
implementation group: 'org.apache.qpid', name: 'qpid-jms-client', version: '1.10.0'

implementation group: 'org.pitest', name: 'pitest', version: '1.14.2'
Expand Down Expand Up @@ -373,6 +380,13 @@ dependencies {
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'

//evidence-share depenedencies
implementation group: 'com.github.hmcts', name: 'cmc-pdf-service-client', version: '7.0.1'
implementation group: 'com.github.hmcts', name: 'send-letter-client', version: '3.0.23'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be a case for moving to EM document-generation with docmosis, rather than using the old pdf-service

// Remove this dependency once the secure doc-store is in use
implementation group: 'com.github.hmcts', name: 'document-management-client', version: '7.0.1'
implementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '6.2.1'

integrationTestImplementation group: 'commons-io', name: 'commons-io', version: '2.13.0'

functionalTestImplementation group: 'commons-io', name: 'commons-io', version: '2.13.0'
Expand Down
2 changes: 1 addition & 1 deletion charts/sscs-tribunals-api/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: sscs-tribunals-api
home: https://github.com/hmcts/sscs-tribunals-case-api
version: 0.0.129
version: 0.0.130
description: SSCS Tribunals Case API
maintainers:
- name: HMCTS SSCS Team
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ elastic:
sscs-evidence-share:
enabled: true
java:
image: hmctspublic.azurecr.io/sscs/evidence-share:latest
image: hmctspublic.azurecr.io/sscs/evidence-share:pr-1618
releaseNameOverride: ${SERVICE_NAME}-sscs-evidence-share
environment:
SEND_LETTER_SERVICE_ENABLED: "true"
Expand All @@ -586,6 +586,7 @@ sscs-evidence-share:
ROBOTICS_EMAIL_PIP_AE_TO: "fake3"
CASE_ACCESS_MANAGEMENT_FEATURE: true
ISSUE_GENERIC_LETTER: true
BYPASS_EVIDENCE_SHARE_SERVICE: true
secrets:
AMQP_PASSWORD:
secretRef: sscs-sb-preview
Expand Down
14 changes: 13 additions & 1 deletion charts/sscs-tribunals-api/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@ java:
CASE_DOCUMENT_AM_URL: http://ccd-case-document-am-api-aat.service.core-compute-aat.internal
WORK_ALLOCATION_FEATURE: true
CASE_ACCESS_MANAGEMENT_FEATURE: true
SCHEDULE_LISTING_FEATURE: true
SCHEDULE_LISTING_FEATURE: true
SEND_LETTER_SERVICE_ENABLED: "true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are all these feature flags still needed?

SEND_LETTER_SERVICE_BASEURL: "http://rpe-send-letter-service-aat.service.core-compute-aat.internal"
SUBSCRIPTION_NAME: "sscs-evidenceshare-subscription-aat"
TOPIC_NAME: "sscs-evidenceshare-topic-aat"
AMQP_HOST: "sscs-servicebus-aat.servicebus.windows.net"
AMQP_USERNAME: "SendAndListenSharedAccessKey"
ROBOTICS_EMAIL_FROM: "sscs@hmcts.net"
ROBOTICS_EMAIL_TO: "fake"
ROBOTICS_EMAIL_SCOTTISH_TO: "fake2"
ROBOTICS_EMAIL_PIP_AE_TO: "fake3"
ISSUE_GENERIC_LETTER: true
BYPASS_EVIDENCE_SHARE_SERVICE: true
24 changes: 24 additions & 0 deletions charts/sscs-tribunals-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ java:
alias: SUBSCRIPTIONS_MAC_SECRET
- name: idam-oauth-user
alias: IDAM_OAUTH2_CLIENT_ID
- name: idam-redirect
- name: ccd-api
alias: CORE_CASE_DATA_API_URL
- name: ccd-jid
alias: CORE_CASE_DATA_JURISDICTION_ID
- name: ccd-tid
Expand Down Expand Up @@ -43,6 +46,13 @@ java:
alias: HEARINGS_EVENT_SERVICE_BUS_CONNECTION_STRING
- name: evidence-share-topic-shared-access-key
alias: AMQP_PASSWORD
- robotics-email-to
- robotics-email-from
- robotics-email-scottish-to
- robotics-email-pip-ae-to
- ld-sdk-key
- sendgrid-api-key

environment:
SERVER_PORT: 8080
REFORM_TEAM: sscs
Expand Down Expand Up @@ -81,10 +91,24 @@ java:
UPLOAD_HEARING_FILTER_ENABLED: false
CITIZEN_LOGIN_SERVICE_V2: false
ADD_LINK_TO_OTHER_ASSOCIATED_CASES_V2: false
IDAM_OAUTH2_CLIENT_ID: "sscs"
CORE_CASE_DATA_JURISDICTION_ID: SSCS
CORE_CASE_DATA_CASE_TYPE_ID: Benefit
SEND_LETTER_SERVICE_BASEURL: "http://rpe-send-letter-service-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal"
SEND_LETTER_SERVICE_ENABLED: "true"
TRUST_ALL_CERTS: "true"
Comment on lines +94 to +99
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a general observation some env vars uses "" and some without "" may be we can make them consistent while you are here :)

SUBSCRIPTION_NAME: "sscs-evidenceshare-subscription-{{ .Values.global.environment }}"
TOPIC_NAME: "sscs-evidenceshare-topic-{{ .Values.global.environment }}"
AMQP_HOST: "sscs-servicebus-{{ .Values.global.environment }}.servicebus.windows.net"
AMQP_USERNAME: "SendAndListenSharedAccessKey"
MAX_RETRY_ATTEMPTS: 3
PDF_SERVICE_BASE_URL: https://docmosis.aat.platform.hmcts.net/rs/render
ROBOTICS_EMAIL_MESSAGE: "Please find attached the robotics json file \nPlease do not respond to this email"
EMAIL_SERVER_HOST: "mta.reform.hmcts.net"
EMAIL_SERVER_PORT: "25"
EMAIL_SMTP_TLS_ENABLED: "true"
EMAIL_SMTP_SSL_TRUST: "*"
BYPASS_EVIDENCE_SHARE_SERVICE: false

idam-pr:
enabled: false
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.jvmargs=-Xmx2048M
2 changes: 1 addition & 1 deletion infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ data "azurerm_key_vault" "sscs_key_vault" {

locals {
azureVaultName = "sscs-${var.env}"
}
}
2 changes: 1 addition & 1 deletion infrastructure/state.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ terraform {
version = "~> 3.68.0"
}
}
}
}
2 changes: 1 addition & 1 deletion infrastructure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ variable "common_tags" {
variable "appinsights_instrumentation_key" {
description = "Instrumentation key of the App Insights instance this webapp should use. Module will create own App Insights resource if this is not provided"
default = ""
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ protected void setJsonAndReplace(String fileLocation, List<String> replaceKeys,

protected void setJson(SscsCaseData sscsCaseData, EventType eventType) throws JsonProcessingException {
CaseDetails<SscsCaseData> caseDetails = new CaseDetails<>(parseLong(sscsCaseData.getCcdCaseId()), JURISDICTION,
sscsCaseData.getState(), sscsCaseData, LocalDateTime.now(), "Benefit");
sscsCaseData.getState(), sscsCaseData, LocalDateTime.now(), "Benefit");
Callback<SscsCaseData> callback = new Callback<>(caseDetails, Optional.empty(),
eventType, false);
eventType, false);
json = mapper.writeValueAsString(callback);
}

protected String getJson(String fileLocation) throws IOException {
String path = Objects.requireNonNull(getClass().getClassLoader()
.getResource(fileLocation)).getFile();
.getResource(fileLocation)).getFile();
return FileUtils.readFileToString(new File(path), StandardCharsets.UTF_8.name());
}

Expand All @@ -125,9 +125,9 @@ protected PreSubmitCallbackResponse<SscsCaseData> assertResponseOkAndGetResult(C
public PreSubmitCallbackResponse<SscsCaseData> deserialize(String source) {
try {
return mapper.readValue(
source,
new TypeReference<>() {
}
source,
new TypeReference<>() {
}
);

} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import uk.gov.hmcts.reform.sscs.ccd.domain.EventType;
import uk.gov.hmcts.reform.sscs.ccd.domain.LanguagePreference;
import uk.gov.hmcts.reform.sscs.service.AirLookupService;

@SpringBootTest
@RunWith(JUnitParamsRunner.class)
@TestPropertySource(locations = "classpath:config/application_it.properties")
public class DocumentConfigurationTest {

@MockBean
protected AirLookupService airLookupService;

@ClassRule
public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import uk.gov.hmcts.reform.sscs.idam.IdamService;
import uk.gov.hmcts.reform.sscs.idam.IdamTokens;
import uk.gov.hmcts.reform.sscs.idam.UserDetails;
import uk.gov.hmcts.reform.sscs.service.AirLookupService;
import uk.gov.hmcts.reform.sscs.service.OnlineHearingService;


Expand All @@ -38,6 +39,8 @@
@AutoConfigureMockMvc(addFilters = false)
public class CitizenRequestControllerIt {

@MockBean
protected AirLookupService airLookupService;
private static final String CASE_ID = "1625080769409918";
private static final String AUTHORIZATION = "Bearer 1203912-39012-=391231";
private static final String E_MAIL = "sscs-citizen2@hmcts.net";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.MvcResult;
import uk.gov.hmcts.reform.sscs.service.AirLookupService;
import uk.gov.hmcts.reform.sscs.service.MessageAuthenticationService;

@RunWith(SpringRunner.class)
Expand All @@ -25,6 +26,9 @@
@AutoConfigureMockMvc(addFilters = false)
public class SubscriptionsControllerIt {

@MockBean
protected AirLookupService airLookupService;

@Autowired
private MockMvc mockMvc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import uk.gov.hmcts.reform.sscs.domain.wrapper.SyaCaseWrapper;
import uk.gov.hmcts.reform.sscs.idam.Authorize;
import uk.gov.hmcts.reform.sscs.model.draft.Draft;
import uk.gov.hmcts.reform.sscs.service.AirLookupService;
import uk.gov.hmcts.reform.sscs.util.SyaServiceHelper;


Expand All @@ -39,6 +40,9 @@
@AutoConfigureMockMvc
public class SyaControllerTest {

@MockBean
protected AirLookupService airLookupService;

private final long ccdId = 1L;
@Autowired
private MockMvc mockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@
import uk.gov.hmcts.reform.document.DocumentUploadClientApi;
import uk.gov.hmcts.reform.document.domain.Classification;
import uk.gov.hmcts.reform.document.domain.UploadResponse;
import uk.gov.hmcts.reform.sscs.service.AirLookupService;

@RunWith(SpringRunner.class)
@SpringBootTest
@TestPropertySource(locations = "classpath:config/application_it.properties")
@AutoConfigureMockMvc
public class EvidenceDocumentUploadEndpointIt {


@MockBean
protected AirLookupService airLookupService;
public static final String AUTH_TOKEN = "authToken";

public static final String DUMMY_OAUTH_2_TOKEN = "oauth2Token";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package uk.gov.hmcts.reform.sscs.evidenceshare.config;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.rules.SpringClassRule;
import org.springframework.test.context.junit4.rules.SpringMethodRule;
import uk.gov.hmcts.reform.sscs.ccd.callback.DocumentType;
import uk.gov.hmcts.reform.sscs.ccd.domain.LanguagePreference;
import uk.gov.hmcts.reform.sscs.service.AirLookupService;

@SpringBootTest
@TestPropertySource(locations = "classpath:config/application_it.properties")
public class DocmosisTemplateConfigTest {

// Below rules are needed to use the junitParamsRunner together with SpringRunner
@ClassRule
public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule();

@Rule
public final SpringMethodRule springMethodRule = new SpringMethodRule();
//end of rules needed for junitParamsRunner

@Autowired
private DocmosisTemplateConfig docmosisTemplateConfig;

@MockBean
protected AirLookupService airLookupService;

@Test
public void docmosisTemplate() {
assertThat("TB-SCS-GNO-ENG-00010.doc").isEqualTo(
docmosisTemplateConfig.getTemplate()
.get(LanguagePreference.ENGLISH).get(DocumentType.DL6.getValue()).get("name"));
assertThat("TB-SCS-GNO-WEL-00469.docx").isEqualTo(
docmosisTemplateConfig.getTemplate().get(LanguagePreference.WELSH).get("d609-97").get(
"name"));

}
}
Loading