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

SSCSCI-1605 AirLookup 23 #1698

Merged
merged 13 commits into from
Feb 20, 2025
3 changes: 1 addition & 2 deletions config/owasp/suppressions.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
<suppress until="2025-02-28">
<cve>CVE-2024-38820</cve>
<suppress until="2025-03-03">
<!-- Requires update of elasticsearch lib that has lucene dependency version > 9.12.0 -->
<cve>CVE-2024-45772</cve>
</suppress>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class AirLookupService {
.csaVenue("Birmingham")
.ibcVenue("Birmingham")
.build();
static final String AIR_LOOKUP_FILE = "reference-data/AIRLookup_22.2.xlsx";
static final String AIR_LOOKUP_FILE = "reference-data/AIRLookup_23.1.xlsx";
static final String AIR_LOOKUP_VENUE_IDS_CSV = "airLookupVenueIds.csv";
private static final int POSTCODE_COLUMN = 0;
private static final int REGIONAL_CENTRE_COLUMN = 8;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 16 additions & 16 deletions src/main/resources/reference-data/sscs-venues.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public void lookupPortOfEntryIbcCode(String portOfEntryCode, @Nullable String ex
"GBSTCOL06,Chelmsford,Bradford",
"GBSTWOR00,Workington,Liverpool",
"GBSTABD00,Aberdeen,Glasgow",
"GBSTGRK00,Dumfries,Glasgow",
"GBSTGRK00,Ayr,Glasgow",
"GBSTDUN00,Dundee,Glasgow",
"GBSTARD00,Ayr,Glasgow",
"GBSTAYR00,Ayr,Glasgow",
Expand All @@ -279,7 +279,7 @@ public void lookupPortOfEntryIbcCode(String portOfEntryCode, @Nullable String ex
"GBSTGRK04,Glasgow,Glasgow",
"GBSTFRB01,Aberdeen,Glasgow",
"GBSTGRK05,Glasgow,Glasgow",
"GBSTGRK06,Stranraer,Glasgow",
"GBSTGRK06,Ayr,Glasgow",
"GBSTAYR01,Ayr,Glasgow",
"GBSTGLW01,Glasgow,Glasgow",
"GBSTGRG02,Stirling,Glasgow",
Expand All @@ -292,27 +292,27 @@ public void lookupPortOfEntryIbcCode(String portOfEntryCode, @Nullable String ex
"GBSTIRV00,Ayr,Glasgow",
"GBSTGRK09,Glasgow,Glasgow",
"GBSTKKD00,Kirkcaldy,Glasgow",
"GBSTKWL00,Kirkwall,Glasgow",
"GBSTKWL00,Inverness,Glasgow",
"GBSTLEI00,Edinburgh,Glasgow",
"GBSTLER00,Lerwick,Glasgow",
"GBSTLER00,Inverness,Glasgow",
"GBSTINV03,Inverness,Glasgow",
"GBSTINV04,Inverness,Glasgow",
"GBSTFRB02,Aberdeen,Glasgow",
"GBSTGRG04,Kirkcaldy,Glasgow",
"GBSTMON00,Dundee,Glasgow",
"GBSTGRK10,Oban,Glasgow",
"GBSTGRK11,Dumfries,Glasgow",
"GBSTGRK11,Ayr,Glasgow",
"GBSTDUN02,Dundee,Glasgow",
"GBSTPHD00,Aberdeen,Glasgow",
"GBSTROS00,Dunfermline,Glasgow",
"GBSTLER01,Lerwick,Glasgow",
"GBSTINV05,Wick,Glasgow",
"GBSTLER01,Inverness,Glasgow",
"GBSTINV05,Inverness,Glasgow",
"GBSTSTO00,Lewis,Glasgow",
"GBSTGRK12,Stranraer,Glasgow",
"GBSTKWL01,Kirkwall,Glasgow",
"GBSTGRK12,Ayr,Glasgow",
"GBSTKWL01,Inverness,Glasgow",
"GBSTDUN03,Dundee,Glasgow",
"GBSTINV06,Inverness,Glasgow",
"GBSTINV07,Wick,Glasgow",
"GBSTINV07,Inverness,Glasgow",
"GBATABZ00,Aberdeen,Glasgow",
"GBATBQH00,Sutton,Sutton",
"GBATBHX00,Birmingham CJC,Birmingham",
Expand Down Expand Up @@ -348,7 +348,7 @@ public void lookupPortOfEntryIbcCode(String portOfEntryCode, @Nullable String ex
"GBATESH00,Brighton,Bradford",
"GBATSOU00,Southampton Magistrates Court,Cardiff",
"GBATSEN00,Southend,Bradford",
"GBATLSI00,Lerwick,Glasgow",
"GBATLSI00,Inverness,Glasgow",
"GBATBCC00,Norwich,Bradford",
"GBATGLO00,Gloucester,Cardiff",
"GBATKEM00,Gloucester,Cardiff",
Expand All @@ -358,7 +358,7 @@ public void lookupPortOfEntryIbcCode(String portOfEntryCode, @Nullable String ex
"GBATSYW00,Northampton,Birmingham",
"GBATSTY00,Lewis,Glasgow",
"GBATWAR00,Blackpool,Liverpool",
"GBATWIK00,Wick,Glasgow",
"GBATWIK00,Inverness,Glasgow",
"GBATYVL00,Taunton,Cardiff",
"GBATBZN00,Oxford,Bradford",
"GBATFFD00,Gloucester,Cardiff",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class VenueDataLoaderTest {

private static final List<String> venueDetailsByLeedsRpc = Arrays.asList(
"517400", "449358", "563156", "45900", "744412", "572158", "288691", "562808", "720624", "427519",
"366796", "999974", "107581", "495952", "852649", "491107", "195520", "641199", "574546", "320113");
"366796", "107581", "495952", "852649", "491107", "195520", "641199", "574546", "320113");

@Before
public void setUp() {
Expand All @@ -35,31 +35,29 @@ public void setUp() {
}

@Test
@Parameters({"1", "2", "3", "8", "11", "22", "24", "30", "34", "35", "37", "38", "40", "44", "45", "48", "52",
"75", "85", "92", "105", "132", "133", "146", "147", "151", "170", "171", "175", "177", "178", "186",
"189", "199", "224", "225", "226", "227", "228", "234", "241", "260", "266", "268", "991", "996", "998",
"1000", "1001", "1004", "1005", "1008", "1009", "1012", "1013", "1014", "1015", "1016", "1020", "1021",
"1027", "1028", "1030", "1033", "1038", "1046", "1047", "1048", "1049", "1050", "1052", "1106", "1113",
"1114", "1115", "1120", "1121", "1122", "1126", "1128", "1133", "1134", "1137", "1138", "1140", "1141",
"1142", "1144", "1145", "1147", "1156", "1157", "1158", "1160", "1183", "1185", "1189", "1194", "1195",
"1196", "1197", "1198", "1199", "1200", "1201", "1202", "1203", "1207", "1208", "1212", "1214", "1217",
"1218", "1220", "1224", "1232", "1239", "1253", "1261"})
@Parameters({"1", "2", "3", "8", "11", "22", "24", "30", "34", "35", "37", "38", "40", "44", "45", "48", "52", "75",
"85", "86", "92", "94", "97", "105", "106", "109", "110", "114", "115", "132", "133", "146", "147", "151",
"170", "171", "175", "177", "178", "186", "189", "199", "203", "221", "224", "225", "226", "227", "228", "234",
"241", "260", "266", "268", "991", "996", "998", "1000", "1001", "1003", "1004", "1005", "1008", "1009", "1012",
"1013", "1014", "1015", "1016", "1020", "1021", "1027", "1028", "1030", "1033", "1038", "1045", "1046", "1047",
"1048", "1049", "1050", "1052", "1106", "1113", "1114", "1115", "1120", "1121", "1122", "1126", "1128", "1133",
"1134", "1137", "1138", "1140", "1141", "1142", "1144", "1145", "1147", "1149", "1156", "1157", "1158", "1160",
"1183", "1185", "1189", "1193", "1194", "1195", "1196", "1197", "1198", "1199", "1200", "1201", "1202", "1203",
"1207", "1208", "1212", "1214", "1217", "1218", "1220", "1224", "1232", "1239", "1253", "1261"})
public void venuesShouldNotBeActive(String id) {
assertTrue(venueDataLoader.getVenueDetailsMap().get(id).getActive().equals("No"));
}

@Test
@Parameters({"7", "9", "10", "43", "49", "51", "53", "60", "61", "62", "63", "64", "65", "67", "68", "70", "71",
"79", "81", "84", "86", "89", "90", "91", "94", "96", "97", "101", "104", "106", "108", "109", "110",
"111", "112", "114", "115", "122", "123", "134", "140", "141", "142", "143", "154", "156", "168", "173",
"179", "185", "187", "192", "194", "195", "198", "200", "201", "203", "205", "206", "209", "210", "221",
"232", "233", "236", "240", "261", "262", "265", "267", "992", "993", "1002", "1003", "1025", "1029",
"1035", "1037", "1043", "1044", "1045", "1053", "1104", "1107", "1111", "1112", "1118", "1127", "1129",
"1130", "1131", "1132", "1135", "1136", "1139", "1143", "1146", "1148", "1149", "1150", "1151", "1152",
"1153", "1154", "1155", "1159", "1161", "1182", "1184", "1186", "1188", "1190", "1192", "1193", "1209",
"1210", "1211", "1213", "1215", "1216", "1219", "1221", "1222", "1223", "1225", "1226", "1227", "1228",
"1229", "1230", "1233", "1234", "1235", "1236", "1237", "1238", "1240", "1241", "1248", "1249",
"1254", "1250", "1256", "1257", "1259"})
"79", "81", "84", "89", "90", "91", "96", "101", "104", "108", "111", "112", "122", "123", "134", "140", "141",
"142", "143", "154", "156", "168", "173", "179", "185", "187", "192", "194", "195", "198", "200", "201", "205",
"206", "209", "210", "232", "233", "236", "240", "261", "262", "265", "267", "992", "993", "1002", "1025",
"1029", "1035", "1037", "1043", "1044", "1053", "1104", "1107", "1111", "1112", "1118", "1127", "1129", "1130",
"1131", "1132", "1135", "1136", "1139", "1143", "1146", "1148", "1150", "1151", "1152", "1153", "1154", "1155",
"1159", "1161", "1182", "1184", "1186", "1188", "1190", "1192", "1209", "1210", "1211", "1213", "1215", "1216",
"1219", "1221", "1222", "1223", "1225", "1226", "1227", "1228", "1229", "1230", "1233", "1234", "1235", "1236",
"1237", "1238", "1240", "1241", "1248", "1249", "1254", "1250", "1256", "1257", "1259"})
public void venuesShouldBeActiveAndHaveAGoogleLink(String id) {
assertTrue(venueDataLoader.getVenueDetailsMap().get(id).getActive().equals("Yes"));
assertTrue(venueDataLoader.getVenueDetailsMap().get(id).getUrl().contains("https://"));
Expand Down Expand Up @@ -151,14 +149,14 @@ public void shouldGetEpimsIdForGivenVenueId() {
@Test
public void shouldGetEpimsIdForGivenPostcode() {
String result = venueDataLoader.getActiveVenueDetailsMapByPostcode().get("MK9 2AJ").getEpimsId();
assertEquals("815997", result);
assertEquals("497356", result);
}

@Test
public void testActiveVenueEpimsIdsMapByRpcReturnsVenues() {
List<VenueDetails> result = venueDataLoader.getActiveVenueEpimsIdsMapByRpc().get("SSCS Leeds");
assertFalse(result.isEmpty());
assertEquals(20, result.size());
assertEquals(19, result.size());
result.forEach(vd -> assertTrue(venueDetailsByLeedsRpc.contains(vd.getEpimsId())));
}

Expand Down