Skip to content

Commit ea02eb1

Browse files
authored
Merge pull request #730 from hmcts/fix/quote-router-scalars-1776694170
fix: Quote #dataSource and #credsreg YAML scalars in router configs
2 parents 7a844e7 + 347102b commit ea02eb1

5 files changed

Lines changed: 17 additions & 15 deletions

File tree

src/functionalTest/resources/application-integration.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ archival-route: direct:LrdArchival
3535
archival-path: azure-storage-blob://${azure.storage.account-name}/lrd-ref-data-archive
3636
active-blob-path: azure-storage-blob://${azure.storage.account-name}/lrd-ref-data
3737
archival-file-names: service-test.csv, building_location_test.csv, court-venue-test.csv
38-
archival-cred: credentials=#credsreg&operation=uploadBlockBlob
38+
archival-cred: 'credentials=#credsreg&operation=uploadBlockBlob'
3939
#archival-date-format keep in dd-MM-yyyy as to delete in testing
4040
archival-date-format: dd-MM-yyyy
4141
file-read-time-out: 2000
@@ -58,13 +58,13 @@ route:
5858
file-name: service-test.csv
5959
table-name: service_to_ccd_case_type_assoc
6060
truncate-sql:
61-
sql:TRUNCATE service_to_ccd_case_type_assoc RESTART identity?dataSource=#dataSource
61+
sql: 'TRUNCATE service_to_ccd_case_type_assoc RESTART identity?dataSource=#dataSource'
6262
insert-sql:
6363
sql:INSERT INTO service_to_ccd_case_type_assoc (service_code, ccd_service_name, ccd_case_type, created_date)
6464
VALUES (:#service_code,:#ccd_service_name,:#ccd_case_type, NOW() AT TIME ZONE 'utc')
65-
ON CONFLICT (service_code, ccd_case_type) DO NOTHING ?dataSource=#dataSource
65+
ON CONFLICT (service_code, ccd_case_type) DO NOTHING ?dataSource='#dataSource'
6666
blob-path:
67-
azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=service-test.csv
67+
'azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=service-test.csv'
6868
processor-class: serviceToCcdCaseTypeProcessor
6969
mapper-class: serviceToCcdCaseTypeMapper
7070
csv-binder-object: serviceToCcdCaseType
@@ -76,9 +76,9 @@ route:
7676
sql:INSERT INTO building_location (epimms_id, building_location_name, building_location_status, area, region_id, cluster_id, court_finder_url, postcode, address, welsh_building_location_name, welsh_address, uprn, latitude, longitude, mrd_building_location_id,mrd_created_time,mrd_updated_time,mrd_deleted_time, created_time, updated_time)
7777
VALUES (:#epimms_id,:#building_location_name,:#building_location_status,:#area,:#region_id,:#cluster_id,:#court_finder_url,:#postcode,:#address,:#welsh_building_location_name,:#welsh_address,:#uprn,:#latitude,:#longitude,:#mrd_building_location_id,:#mrd_created_time,:#mrd_updated_time,:#mrd_deleted_time,NOW() AT TIME ZONE 'utc',NOW() AT TIME ZONE 'utc')
7878
ON CONFLICT (epimms_id) DO UPDATE SET building_location_name = :#building_location_name,building_location_status = :#building_location_status,area = :#area,region_id = :#region_id,cluster_id = :#cluster_id,
79-
court_finder_url = :#court_finder_url,postcode = :#postcode,address = :#address,welsh_building_location_name = :#welsh_building_location_name,welsh_address = :#welsh_address,uprn = :#uprn,latitude = :#latitude,longitude = :#longitude,mrd_building_location_id = :#mrd_building_location_id,mrd_created_time = :#mrd_created_time,mrd_updated_time = :#mrd_updated_time,mrd_deleted_time = :#mrd_deleted_time,updated_time = NOW() AT TIME ZONE 'utc'?dataSource=#dataSource
79+
court_finder_url = :#court_finder_url,postcode = :#postcode,address = :#address,welsh_building_location_name = :#welsh_building_location_name,welsh_address = :#welsh_address,uprn = :#uprn,latitude = :#latitude,longitude = :#longitude,mrd_building_location_id = :#mrd_building_location_id,mrd_created_time = :#mrd_created_time,mrd_updated_time = :#mrd_updated_time,mrd_deleted_time = :#mrd_deleted_time,updated_time = NOW() AT TIME ZONE 'utc'?dataSource='#dataSource'
8080
blob-path:
81-
azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=building_location_test.csv
81+
'azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=building_location_test.csv'
8282
processor-class: buildingLocationProcessor
8383
mapper-class: buildingLocationMapper
8484
csv-binder-object: buildingLocation
@@ -109,9 +109,9 @@ route:
109109
welsh_court_name = :#welsh_court_name, uprn = :#uprn, venue_ou_code = :#venue_ou_code, mrd_building_location_id = :#mrd_building_location_id,
110110
mrd_venue_id = :#mrd_venue_id, service_url = :#service_url, fact_url = :#fact_url,
111111
mrd_created_time = :#mrd_created_time, mrd_updated_time = :#mrd_updated_time, mrd_deleted_time = :#mrd_deleted_time,
112-
external_short_name = :#external_short_name, welsh_external_short_name = :#welsh_external_short_name,updated_time = NOW() AT TIME ZONE 'utc'?dataSource=#dataSource
112+
external_short_name = :#external_short_name, welsh_external_short_name = :#welsh_external_short_name,updated_time = NOW() AT TIME ZONE 'utc'?dataSource='#dataSource'
113113
blob-path:
114-
azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=court-venue-test.csv
114+
'azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=court-venue-test.csv'
115115
processor-class: courtVenueProcessor
116116
mapper-class: courtVenueMapper
117117
csv-binder-object: courtVenue

src/main/resources/application-camel-routes-common.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ archival-route: direct:LrdArchival
44
archival-path: azure-storage-blob://${azure.storage.account-name}/lrd-ref-data-archive
55
active-blob-path: azure-storage-blob://${azure.storage.account-name}/lrd-ref-data
66
archival-file-names: OrgServiceCCDMapping.csv, BuildingLocation.csv, CourtVenue.csv
7-
archival-cred: credentials=#credsreg&operation=uploadBlockBlob
7+
archival-cred: 'credentials=#credsreg&operation=uploadBlockBlob'
88
archival-date-format: dd-MM-yyyy--HH-mm
99
file-read-time-out: 180000
1010
batchjob-name: LocationRefDataLoad

src/main/resources/application-lrd-building-location-router.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ route:
1111
sql:INSERT INTO building_location (epimms_id, building_location_name, building_location_status, area, region_id, cluster_id, court_finder_url, postcode, address, welsh_building_location_name, welsh_address, uprn, latitude, longitude, mrd_building_location_id,mrd_created_time,mrd_updated_time,mrd_deleted_time, created_time, updated_time)
1212
VALUES (:#epimms_id,:#building_location_name,:#building_location_status,:#area,:#region_id,:#cluster_id,:#court_finder_url,:#postcode,:#address,:#welsh_building_location_name,:#welsh_address,:#uprn,:#latitude,:#longitude,:#mrd_building_location_id,:#mrd_created_time,:#mrd_updated_time,:#mrd_deleted_time,NOW() AT TIME ZONE 'utc',NOW() AT TIME ZONE 'utc')
1313
ON CONFLICT (epimms_id) DO UPDATE SET building_location_name = :#building_location_name,building_location_status = :#building_location_status,area = :#area,region_id = :#region_id,cluster_id = :#cluster_id,
14-
court_finder_url = :#court_finder_url,postcode = :#postcode,address = :#address,welsh_building_location_name = :#welsh_building_location_name,welsh_address = :#welsh_address,uprn = :#uprn,latitude = :#latitude,longitude = :#longitude,mrd_building_location_id = :#mrd_building_location_id,mrd_created_time = :#mrd_created_time,mrd_updated_time = :#mrd_updated_time,mrd_deleted_time = :#mrd_deleted_time,updated_time = NOW() AT TIME ZONE 'utc'?dataSource=#dataSource
14+
court_finder_url = :#court_finder_url,postcode = :#postcode,address = :#address,welsh_building_location_name = :#welsh_building_location_name,welsh_address = :#welsh_address,uprn = :#uprn,latitude = :#latitude,longitude = :#longitude,mrd_building_location_id = :#mrd_building_location_id,mrd_created_time = :#mrd_created_time,mrd_updated_time = :#mrd_updated_time,mrd_deleted_time = :#mrd_deleted_time,updated_time = NOW() AT TIME ZONE 'utc'?dataSource='#dataSource'
1515
blob-path:
16-
azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=BuildingLocation.csv
16+
'azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=BuildingLocation.csv'
1717
processor-class: buildingLocationProcessor
1818
mapper-class: buildingLocationMapper
1919
csv-binder-object: buildingLocation

src/main/resources/application-lrd-court-venue-router.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ route:
2727
welsh_court_name = :#welsh_court_name, uprn = :#uprn, venue_ou_code = :#venue_ou_code, mrd_building_location_id = :#mrd_building_location_id,
2828
mrd_venue_id = :#mrd_venue_id, service_url = :#service_url, fact_url = :#fact_url,
2929
mrd_created_time = :#mrd_created_time, mrd_updated_time = :#mrd_updated_time, mrd_deleted_time = :#mrd_deleted_time,
30-
external_short_name = :#external_short_name, welsh_external_short_name = :#welsh_external_short_name ,updated_time = NOW() AT TIME ZONE 'utc'?dataSource=#dataSource
30+
external_short_name = :#external_short_name, welsh_external_short_name = :#welsh_external_short_name ,updated_time = NOW() AT TIME ZONE 'utc'?dataSource='#dataSource'
3131
blob-path:
32-
azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=CourtVenue.csv
32+
'azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=CourtVenue.csv'
3333
processor-class: courtVenueProcessor
3434
mapper-class: courtVenueMapper
3535
csv-binder-object: courtVenue

src/main/resources/application-lrd-router.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ route:
77
id: lrd-ccd-casetype-load
88
file-name: OrgServiceCCDMapping.csv
99
table-name: service_to_ccd_case_type_assoc
10+
truncate-sql:
11+
sql: 'TRUNCATE service_to_ccd_case_type_assoc RESTART identity?dataSource=#dataSource'
1012
insert-sql:
1113
sql:INSERT INTO service_to_ccd_case_type_assoc (service_code, ccd_service_name, ccd_case_type, created_date)
1214
VALUES (:#service_code,:#ccd_service_name,:#ccd_case_type, NOW() AT TIME ZONE 'utc')
13-
ON CONFLICT (service_code, ccd_case_type) DO NOTHING ?dataSource=#dataSource
15+
ON CONFLICT (service_code, ccd_case_type) DO NOTHING ?dataSource='#dataSource'
1416
blob-path:
15-
azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=OrgServiceCCDMapping.csv
17+
'azure-storage-blob://${azure.storage.account-name}/lrd-ref-data?credentials=#credsreg&operation=uploadBlockBlob&blobName=OrgServiceCCDMapping.csv'
1618
processor-class: serviceToCcdCaseTypeProcessor
1719
mapper-class: serviceToCcdCaseTypeMapper
1820
csv-binder-object: serviceToCcdCaseType

0 commit comments

Comments
 (0)