Skip to content

Commit

Permalink
Merge pull request #628 from DependencyTrack/issue-1070-2
Browse files Browse the repository at this point in the history
Raise baseline Java version to 21
  • Loading branch information
nscuro authored Mar 21, 2024
2 parents 1725d35 + d09159a commit 771827e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 5 deletions.
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>us.springett</groupId>
<artifactId>alpine-parent</artifactId>
<version>2.2.4</version>
<version>2.2.5</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -82,6 +82,9 @@
</ciManagement>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>

<!-- Dependency Versions -->
<lib.alpine.version>${project.parent.version}</lib.alpine.version>
<lib.awaitility.version>4.2.0</lib.awaitility.version>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/migration/changelog-main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<!-- Use separate changelogs per release. -->
<include file="migration/changelog-v5.3.0.xml"/>
<include file="migration/changelog-v5.4.0.xml"/>
<include file="migration/changelog-v5.5.0.xml"/>
<include file="migration/changelog-procedures.xml"/>
</databaseChangeLog>
18 changes: 18 additions & 0 deletions src/main/resources/migration/changelog-v5.5.0.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
objectQuotingStrategy="QUOTE_ALL_OBJECTS"
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd
http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<changeSet id="v5.5.0-1" author="[email protected]">
<addColumn tableName="APIKEY">
<column name="COMMENT" type="VARCHAR(255)"/>
<column name="CREATED" type="TIMESTAMP WITH TIME ZONE"/>
<column name="LAST_USED" type="TIMESTAMP WITH TIME ZONE"/>
</addColumn>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ public void addTeamToRuleWithCustomEmailPublisherTest() {
"teams": [
{
"uuid": "${json-unit.matches:teamUuid}",
"name": "Team Example"
"name": "Team Example",
"permissions": []
}
],
"notifyOn": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.glassfish.jersey.servlet.ServletContainer;
import org.glassfish.jersey.test.DeploymentContext;
import org.glassfish.jersey.test.ServletDeploymentContext;
import org.hamcrest.CoreMatchers;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
Expand Down Expand Up @@ -639,9 +640,24 @@ public void patchProjectParentTest() {

assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());

final JsonObject responseJson = parseJsonObject(response);
assertThat(responseJson.getString("uuid")).isEqualTo(project.getUuid().toString());
assertThat(responseJson.getJsonObject("parent")).isNull(); // Parents are currently not returned
assertThatJson(getPlainTextBody(response))
.withMatcher("projectUuid", CoreMatchers.equalTo(project.getUuid().toString()))
.withMatcher("parentProjectUuid", CoreMatchers.equalTo(newParent.getUuid().toString()))
.isEqualTo("""
{
"name": "DEF",
"version": "2.0",
"uuid": "${json-unit.matches:projectUuid}",
"parent": {
"name": "GHI",
"version": "3.0",
"uuid": "${json-unit.matches:parentProjectUuid}"
},
"properties": [],
"tags": [],
"active": true
}
""");

// Ensure the parent was updated.
qm.getPersistenceManager().refresh(project);
Expand Down

0 comments on commit 771827e

Please sign in to comment.