diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8e3f5331..57fd198d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,11 +21,11 @@ jobs: - env: latest image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:latest-dev" - env: release - image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:25.07.01" + image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:26.02.17" - env: next-release - image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:26.02.17-RC01" - # - env: previous - # image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:25.07.01" + image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:26.07.16-RC01" + - env: previous + image: "ghcr.io/hydrologicengineeringcenter/cwms-database/cwms/database-ready-ora-23.5:25.07.01" name: build and test (jdk ${{matrix.jdk}}, schema ${{matrix.schema.env}}) runs-on: ubuntu-latest outputs: diff --git a/cwms-data-api/src/main/java/cwms/cda/helpers/DatabaseHelpers.java b/cwms-data-api/src/main/java/cwms/cda/helpers/DatabaseHelpers.java index 5cd60f43b..4d0f574ff 100644 --- a/cwms-data-api/src/main/java/cwms/cda/helpers/DatabaseHelpers.java +++ b/cwms-data-api/src/main/java/cwms/cda/helpers/DatabaseHelpers.java @@ -7,6 +7,8 @@ public class DatabaseHelpers { public enum SCHEMA_VERSION { V2025_07_01(250701, "25.07.01"), + V2026_02_17(260217, "26.02.17"), + V2026_07_16(260216, "26.07.16"), LATEST_DEV(LATEST_SCHEMA, "99.99.99"), BYPASS(-1, "Bypass") ; diff --git a/cwms-data-api/src/test/java/cwms/cda/data/dao/location/kind/LockDaoIT.java b/cwms-data-api/src/test/java/cwms/cda/data/dao/location/kind/LockDaoIT.java index 485771c9c..2eb40f258 100644 --- a/cwms-data-api/src/test/java/cwms/cda/data/dao/location/kind/LockDaoIT.java +++ b/cwms-data-api/src/test/java/cwms/cda/data/dao/location/kind/LockDaoIT.java @@ -329,36 +329,37 @@ private Lock storeLocLevelsAndBuildStorableLock(Lock lock) throws SQLException { } private List createLocationLevelList(Lock lock) { + var effectiveDate = ZonedDateTime.now().withSecond(0).withNano(0).toInstant(); List retVal = new ArrayList<>(); - var lowLowerLevel = new ConstantLocationLevel.Builder(lock.getLowWaterLowerPoolLocationLevel().getLevelId(), ZonedDateTime.now().toInstant()) + var lowLowerLevel = new ConstantLocationLevel.Builder(lock.getLowWaterLowerPoolLocationLevel().getLevelId(), effectiveDate) .withLevelUnitsId(lock.getElevationUnits()) .withOfficeId(lock.getLowWaterLowerPoolLocationLevel().getOfficeId()) .withSpecifiedLevelId(lock.getLowWaterLowerPoolLocationLevel().getSpecifiedLevelId()) .withConstantValue(lock.getLowWaterLowerPoolLocationLevel().getLevelValue()) .build(); retVal.add(lowLowerLevel); - var lowUpperLevel = new ConstantLocationLevel.Builder(lock.getLowWaterUpperPoolLocationLevel().getLevelId(), ZonedDateTime.now().toInstant()) + var lowUpperLevel = new ConstantLocationLevel.Builder(lock.getLowWaterUpperPoolLocationLevel().getLevelId(), effectiveDate) .withLevelUnitsId(lock.getElevationUnits()) .withOfficeId(lock.getLowWaterUpperPoolLocationLevel().getOfficeId()) .withSpecifiedLevelId(lock.getLowWaterUpperPoolLocationLevel().getSpecifiedLevelId()) .withConstantValue(lock.getLowWaterUpperPoolLocationLevel().getLevelValue()) .build(); retVal.add(lowUpperLevel); - var highLowerLevel = new ConstantLocationLevel.Builder(lock.getHighWaterLowerPoolLocationLevel().getLevelId(), ZonedDateTime.now().toInstant()) + var highLowerLevel = new ConstantLocationLevel.Builder(lock.getHighWaterLowerPoolLocationLevel().getLevelId(), effectiveDate) .withLevelUnitsId(lock.getElevationUnits()) .withOfficeId(lock.getHighWaterLowerPoolLocationLevel().getOfficeId()) .withSpecifiedLevelId(lock.getHighWaterLowerPoolLocationLevel().getSpecifiedLevelId()) .withConstantValue(lock.getHighWaterLowerPoolLocationLevel().getLevelValue()) .build(); retVal.add(highLowerLevel); - var highUpperLevel = new ConstantLocationLevel.Builder(lock.getHighWaterUpperPoolLocationLevel().getLevelId(), ZonedDateTime.now().toInstant()) + var highUpperLevel = new ConstantLocationLevel.Builder(lock.getHighWaterUpperPoolLocationLevel().getLevelId(), effectiveDate) .withLevelUnitsId(lock.getElevationUnits()) .withOfficeId(lock.getHighWaterUpperPoolLocationLevel().getOfficeId()) .withSpecifiedLevelId(lock.getHighWaterUpperPoolLocationLevel().getSpecifiedLevelId()) .withConstantValue(lock.getHighWaterUpperPoolLocationLevel().getLevelValue()) .build(); retVal.add(highUpperLevel); - var warningBuffer = new ConstantLocationLevel.Builder(String.format("%s.Elev-Closure.Inst.0.Warning Buffer", lock.getLocation().getName()), ZonedDateTime.now().toInstant()) + var warningBuffer = new ConstantLocationLevel.Builder(String.format("%s.Elev-Closure.Inst.0.Warning Buffer", lock.getLocation().getName()), effectiveDate) .withLevelUnitsId(lock.getElevationUnits()) .withOfficeId(lock.getLocation().getOfficeId()) .withSpecifiedLevelId("Warning Buffer") diff --git a/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterContractDaoTestIT.java b/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterContractDaoTestIT.java index 4e093d695..309a23863 100644 --- a/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterContractDaoTestIT.java +++ b/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterContractDaoTestIT.java @@ -215,6 +215,7 @@ void testStoreAndRetrieveWaterContractList() throws Exception { WaterUserContract result = retrievedContract.get(0); DTOMatch.assertMatch(contract, result); result = retrievedContract.get(1); + DTOMatch.assertMatch(contract2, result); }, CwmsDataApiSetupCallback.getWebUser()); } @@ -468,7 +469,8 @@ private static Location buildTestLocation(String locationName, String locationTy .withPublicName("Test Public Name") .withLongName("Test Long Name") .withDescription("Test Description") - .withNearestCity("Davis, California") + // Older Schemas will use as-is, newer schemas will force it to be this anyways + .withNearestCity("Davis, CA") .withLatitude(38.55) .withLongitude(-121.73) .withPublishedLatitude(38.55) diff --git a/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterSupplyAccountingDaoIT.java b/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterSupplyAccountingDaoIT.java index 4918e3e6c..a994accb4 100644 --- a/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterSupplyAccountingDaoIT.java +++ b/cwms-data-api/src/test/java/cwms/cda/data/dao/watersupply/WaterSupplyAccountingDaoIT.java @@ -407,7 +407,7 @@ protected static Location buildTestLocation(String locationName, String location .withPublicName("Test Public Name") .withLongName("Test Long Name") .withDescription("Test Description") - .withNearestCity("Davis, California") + .withNearestCity("Davis, CA") .withLatitude(38.55) .withLongitude(-121.73) .withPublishedLatitude(38.55)