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

Story: [CCMSPUI 100] Fully qualify database objects #61

Merged
merged 3 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ test-results/

# Snyk
.dccache

caab-service/src/main/resources/application-secret.yml
2 changes: 1 addition & 1 deletion caab-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation platform('org.testcontainers:testcontainers-bom:1.19.3')
testImplementation 'org.testcontainers:testcontainers'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:oracle-xe'
testImplementation 'org.testcontainers:oracle-free'
}

test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.oracle.OracleContainer;
import org.testcontainers.junit.jupiter.Testcontainers;

@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
Expand All @@ -16,9 +17,10 @@ public interface IntegrationTestInterface {

@DynamicPropertySource
static void properties(DynamicPropertyRegistry registry) {
registry.add("spring.datasource.url", oracleContainerSingleton.getOracleContainer()::getJdbcUrl);
registry.add("spring.datasource.username", oracleContainerSingleton.getOracleContainer()::getUsername);
registry.add("spring.datasource.password", oracleContainerSingleton.getOracleContainer()::getPassword);
OracleContainer oracleContainer = oracleContainerSingleton.getOracleContainer();
registry.add("spring.datasource.url", oracleContainer::getJdbcUrl);
registry.add("spring.datasource.username", oracleContainer::getUsername);
registry.add("spring.datasource.password", oracleContainer::getPassword);
}
}

Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package uk.gov.laa.ccms.data.api;

import org.testcontainers.containers.OracleContainer;
import org.testcontainers.oracle.OracleContainer;

public class OracleContainerSingleton {

private static OracleContainerSingleton instance;
private final OracleContainer oracleContainer;

private OracleContainerSingleton() {
oracleContainer = new OracleContainer("gvenzl/oracle-xe:21-slim-faststart");
oracleContainer = new OracleContainer("gvenzl/oracle-free:23-slim-faststart")
.withUsername("XXCCMS_PUI");
oracleContainer.start();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
INSERT INTO XXCCMS_ADDRESS
INSERT INTO XXCCMS_PUI.XXCCMS_ADDRESS
(ID, NO_FIXED_ABODE, POSTCODE, HOUSE_NAME_NUMBER, ADDRESS_LINE1, ADDRESS_LINE2, CITY, COUNTY, COUNTRY, CARE_OF, PREFERRED_ADDRESS, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(42, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TIMESTAMP '2023-10-04 10:23:17.672000', '[email protected]', TIMESTAMP '2023-10-04 10:23:17.672000', '[email protected]');
INSERT INTO XXCCMS_ADDRESS
INSERT INTO XXCCMS_PUI.XXCCMS_ADDRESS
(ID, NO_FIXED_ABODE, POSTCODE, HOUSE_NAME_NUMBER, ADDRESS_LINE1, ADDRESS_LINE2, CITY, COUNTY, COUNTRY, CARE_OF, PREFERRED_ADDRESS, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(22, 0, 'string', 'string', 'string', 'string', 'string', 'string', 'GBR', 'string', 'string', TIMESTAMP '2023-10-03 08:27:05.266000', '[email protected]', TIMESTAMP '2023-10-03 08:27:05.266000', '[email protected]');
INSERT INTO XXCCMS_ADDRESS
INSERT INTO XXCCMS_PUI.XXCCMS_ADDRESS
(ID, NO_FIXED_ABODE, POSTCODE, HOUSE_NAME_NUMBER, ADDRESS_LINE1, ADDRESS_LINE2, CITY, COUNTY, COUNTRY, CARE_OF, PREFERRED_ADDRESS, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(25, 0, 'string', 'string', 'string', 'string', 'string', 'string', 'GBR', 'string', 'string', TIMESTAMP '2023-10-03 08:49:50.262000', '[email protected]', TIMESTAMP '2023-10-03 08:49:50.262000', '[email protected]');

INSERT INTO XXCCMS_COST_STRUCTURE
INSERT INTO XXCCMS_PUI.XXCCMS_COST_STRUCTURE
(ID, DEFAULT_COST_LIMITATION, GRANTED_COST_LIMITATION, REQUESTED_COST_LIMITATION, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(43, 0, 0, 0, TIMESTAMP '2023-10-04 10:23:17.927000', '[email protected]', TIMESTAMP '2023-10-04 10:23:17.927000', '[email protected]');
INSERT INTO XXCCMS_COST_STRUCTURE
INSERT INTO XXCCMS_PUI.XXCCMS_COST_STRUCTURE
(ID, DEFAULT_COST_LIMITATION, GRANTED_COST_LIMITATION, REQUESTED_COST_LIMITATION, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(23, 0, 0, 0, TIMESTAMP '2023-10-03 08:27:05.592000', '[email protected]', TIMESTAMP '2023-10-03 08:27:05.592000', '[email protected]');
INSERT INTO XXCCMS_COST_STRUCTURE
INSERT INTO XXCCMS_PUI.XXCCMS_COST_STRUCTURE
(ID, DEFAULT_COST_LIMITATION, GRANTED_COST_LIMITATION, REQUESTED_COST_LIMITATION, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(26, 0, 0, 0, TIMESTAMP '2023-10-03 08:49:50.389000', '[email protected]', TIMESTAMP '2023-10-03 08:49:50.389000', '[email protected]');

INSERT INTO XXCCMS_APPLICATION
INSERT INTO XXCCMS_PUI.XXCCMS_APPLICATION
(ID, LSC_CASE_REFERENCE, PROVIDER_ID, PROVIDER_CASE_REFERENCE, PROVIDER_DISPLAY_VALUE, OFFICE_ID, OFFICE_DISPLAY_VALUE, SUPERVISOR, SUPERVISOR_DISPLAY_VALUE, FEE_EARNER, FEE_EARNER_DISPLAY_VALUE, PROVIDER_CONTACT, PROVIDER_CONTACT_DISPLAY_VALUE, CATEGORY_OF_LAW, CATEGORY_OF_LAW_DISPLAY_VALUE, RELATION_TO_LINKED_CASE, OPPONENT_APPLIED_FOR_FUNDING, DISPLAY_STATUS, ACTUAL_STATUS, CLIENT_FIRSTNAME, CLIENT_SURNAME, CLIENT_REFERENCE, AMENDMENT, MEANS_ASSESSMENT_AMENDED, MERITS_ASSESSMENT_AMENDED, COST_LIMIT_CHANGED, COST_LIMIT_AT_TIME_OF_MERITS, SUBMISSION_STATUS, POLL_TRANSACTION_ID, APPLICATION_TYPE, APPLICATION_TYPE_DISPLAY_VALUE, DEVOLVED_POWERS_USED, DATE_DEVOLVED_POWERS_USED, DEVOLVED_POWERS_CONTRACT_FLAG, MERITS_REASSESSMENT_REQD_IND, LAR_SCOPE_FLAG, LEAD_PROCEEDING_CHANGED, FK_COST_STRUCTURE, FK_CORRESPONDENCE_ADDRESS, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(41, '300001644533', '26517', NULL, 'SWITALSKI''S SOLICITORS LTD', 85391, 'SWITALSKI''S SOLICITORS LTD-0P322F', NULL, NULL, NULL, NULL, NULL, NULL, 'AAP', 'Claim Against Public Authority', NULL, NULL, 'Unsubmitted', 'UNSUBMITTED', 'PTEST', 'PP', '62595640', 0, 0, 0, 0, NULL, NULL, NULL, 'ECF', 'Exceptional Case Funding', 'N', NULL, 'Yes - Excluding JR Proceedings', 0, 'Y', 0, 43, 42, TIMESTAMP '2023-10-04 10:23:17.995000', '[email protected]', TIMESTAMP '2023-10-04 10:23:17.995000', '[email protected]');
INSERT INTO XXCCMS_APPLICATION
INSERT INTO XXCCMS_PUI.XXCCMS_APPLICATION
(ID, LSC_CASE_REFERENCE, PROVIDER_ID, PROVIDER_CASE_REFERENCE, PROVIDER_DISPLAY_VALUE, OFFICE_ID, OFFICE_DISPLAY_VALUE, SUPERVISOR, SUPERVISOR_DISPLAY_VALUE, FEE_EARNER, FEE_EARNER_DISPLAY_VALUE, PROVIDER_CONTACT, PROVIDER_CONTACT_DISPLAY_VALUE, CATEGORY_OF_LAW, CATEGORY_OF_LAW_DISPLAY_VALUE, RELATION_TO_LINKED_CASE, OPPONENT_APPLIED_FOR_FUNDING, DISPLAY_STATUS, ACTUAL_STATUS, CLIENT_FIRSTNAME, CLIENT_SURNAME, CLIENT_REFERENCE, AMENDMENT, MEANS_ASSESSMENT_AMENDED, MERITS_ASSESSMENT_AMENDED, COST_LIMIT_CHANGED, COST_LIMIT_AT_TIME_OF_MERITS, SUBMISSION_STATUS, POLL_TRANSACTION_ID, APPLICATION_TYPE, APPLICATION_TYPE_DISPLAY_VALUE, DEVOLVED_POWERS_USED, DATE_DEVOLVED_POWERS_USED, DEVOLVED_POWERS_CONTRACT_FLAG, MERITS_REASSESSMENT_REQD_IND, LAR_SCOPE_FLAG, LEAD_PROCEEDING_CHANGED, FK_COST_STRUCTURE, FK_CORRESPONDENCE_ADDRESS, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(21, '300001644516', '26517', '329635', 'SWITALSKI''S SOLICITORS LTD', 145512, 'SWITALSKI''S SOLICITORS LTD-2L847Q', '2854148', 'David Greenwood', '2027148', 'Carole Spencer', '2027079', '[email protected]', 'AAP', 'Claim Against Public Authority', NULL, NULL, 'Unsubmitted', 'UNSUBMITTED', 'Phil', 'Payne', 'PhilTest', 0, 0, 0, 0, 1350, NULL, NULL, 'SUB', 'Substantive', 'N', NULL, 'Yes - Excluding JR Proceedings', 0, 'Y', 0, 23, 22, TIMESTAMP '2023-10-03 08:27:05.652000', '[email protected]', TIMESTAMP '2023-10-03 08:27:05.652000', '[email protected]');
INSERT INTO XXCCMS_APPLICATION
INSERT INTO XXCCMS_PUI.XXCCMS_APPLICATION
(ID, LSC_CASE_REFERENCE, PROVIDER_ID, PROVIDER_CASE_REFERENCE, PROVIDER_DISPLAY_VALUE, OFFICE_ID, OFFICE_DISPLAY_VALUE, SUPERVISOR, SUPERVISOR_DISPLAY_VALUE, FEE_EARNER, FEE_EARNER_DISPLAY_VALUE, PROVIDER_CONTACT, PROVIDER_CONTACT_DISPLAY_VALUE, CATEGORY_OF_LAW, CATEGORY_OF_LAW_DISPLAY_VALUE, RELATION_TO_LINKED_CASE, OPPONENT_APPLIED_FOR_FUNDING, DISPLAY_STATUS, ACTUAL_STATUS, CLIENT_FIRSTNAME, CLIENT_SURNAME, CLIENT_REFERENCE, AMENDMENT, MEANS_ASSESSMENT_AMENDED, MERITS_ASSESSMENT_AMENDED, COST_LIMIT_CHANGED, COST_LIMIT_AT_TIME_OF_MERITS, SUBMISSION_STATUS, POLL_TRANSACTION_ID, APPLICATION_TYPE, APPLICATION_TYPE_DISPLAY_VALUE, DEVOLVED_POWERS_USED, DATE_DEVOLVED_POWERS_USED, DEVOLVED_POWERS_CONTRACT_FLAG, MERITS_REASSESSMENT_REQD_IND, LAR_SCOPE_FLAG, LEAD_PROCEEDING_CHANGED, FK_COST_STRUCTURE, FK_CORRESPONDENCE_ADDRESS, CREATED, CREATED_BY, MODIFIED, MODIFIED_BY)
VALUES(24, '300001644517', '26517', '329635', 'SWITALSKI''S SOLICITORS LTD', 145512, 'SWITALSKI''S SOLICITORS LTD-2L847Q', '2854148', 'David Greenwood', '2027148', 'Carole Spencer', '2027079', '[email protected]', 'AAP', 'Claim Against Public Authority', NULL, NULL, 'Unsubmitted', 'UNSUBMITTED', 'Phil', 'Payne', 'PhilTest', 0, 0, 0, 0, 1350, NULL, NULL, 'ECF', 'Exceptional Case Funding', 'N', NULL, 'Yes - Excluding JR Proceedings', 0, 'Y', 0, 26, 25, TIMESTAMP '2023-10-03 08:49:50.403000', '[email protected]', TIMESTAMP '2023-10-03 08:49:50.410000', '[email protected]');

Loading
Loading