("importHostingAssets") {
useJUnitPlatform {
includeTags("importHostingAssets")
@@ -574,14 +590,22 @@ tasks.register("convertMarkdownToHtml") {
// Define the template file using project.file
val templateFile = project.file("doc/scenarios/.template.html")
- // Define input directory using layout property
- val inputDir = layout.buildDirectory.dir("doc/scenarios")
-
- // Use inputs and outputs for better up-to-date checks
inputs.file(templateFile).withPathSensitivity(PathSensitivity.NONE)
- inputs.dir(inputDir).withPathSensitivity(PathSensitivity.RELATIVE)
+
+ // Define input+output directory using layout property
+ val inputDir = layout.buildDirectory.dir("doc/scenarios")
outputs.dir(inputDir) // Output HTMLs will be in the same directory
+ onlyIf {
+ val dir = inputDir.get().asFile
+ if (!dir.exists()) {
+ logger.lifecycle("Skipping convertMarkdownToHtml because ${dir} does not exist (scenarioTest skipped).")
+ false
+ } else {
+ true
+ }
+ }
+
doFirst {
// Check if pandoc is installed using exec and capturing output/errors
val result = project.exec {
@@ -598,21 +622,9 @@ tasks.register("convertMarkdownToHtml") {
if (!templateFile.exists()) {
throw GradleException("Template file '$templateFile' not found.")
}
- // Ensure input directory exists (Gradle handles this implicitly usually, but explicit check is fine)
- if (!inputDir.get().asFile.exists()) {
- logger.warn("Input directory ${inputDir.get().asFile} does not exist, skipping Pandoc conversion.")
- // Potentially disable the task or skip doLast if input dir missing
- enabled = false // Example: disable task if input dir doesn't exist yet
- }
}
doLast {
- // Check if input dir exists again, in case it was created between doFirst and doLast
- if (!inputDir.get().asFile.exists()) {
- logger.warn("Input directory ${inputDir.get().asFile} still does not exist, skipping Pandoc conversion.")
- return@doLast // Skip execution
- }
-
// Gather all Markdown files in the input directory
project.fileTree(inputDir) {
include("*.md")
diff --git a/etc/allowed-licenses.json b/etc/allowed-licenses.json
index 447f5c62..61ca10e8 100644
--- a/etc/allowed-licenses.json
+++ b/etc/allowed-licenses.json
@@ -21,10 +21,18 @@
"moduleVersion": "1.0.0",
"moduleName": "org.jspecify:jspecify"
},
+ {
+ "moduleLicense": null,
+ "#moduleLicense": "BSD 3-clause",
+ "moduleVersion": "4.13.0",
+ "moduleName": "org.antlr:antlr4-runtime"
+ },
{ "moduleLicense": "BSD License" },
{ "moduleLicense": "BSD-2-Clause" },
+ { "moduleLicense": "The 2-Clause BSD License" },
{ "moduleLicense": "BSD-3-Clause" },
+ { "moduleLicense": "The 3-Clause BSD License" },
{ "moduleLicense": "The BSD License" },
{ "moduleLicense": "The New BSD License" },
@@ -45,6 +53,8 @@
{ "moduleLicense": "GNU Library General Public License v2.1 or later" },
{ "moduleLicense": "GNU General Public License, version 2 with the GNU Classpath Exception" },
+ { "moduleLicense": "GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1" },
+
{ "moduleLicense": "GPL2 w/ CPE" },
{ "moduleLicense": "LGPL, version 2.1"},
@@ -57,11 +67,8 @@
{ "moduleLicense": "WTFPL" },
- {
- "moduleLicense": "Public Domain, per Creative Commons CC0",
- "moduleVersion": "2.0.3"
- }
-
-
+ { "moduleLicense": "Creative Commons Legal Code" },
+ { "moduleLicense": "PUBLIC DOMAIN" },
+ { "moduleLicense": "Public Domain, per Creative Commons CC0" }
]
}
diff --git a/etc/jenkinsAgent.Dockerfile b/etc/jenkinsAgent.Dockerfile
deleted file mode 100644
index f06e9e4f..00000000
--- a/etc/jenkinsAgent.Dockerfile
+++ /dev/null
@@ -1,6 +0,0 @@
-FROM eclipse-temurin:21-jdk
-RUN apt-get update && \
- apt-get install -y bind9-utils pandoc && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/*
-
diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java
index f1e2bcb8..fc2ff6ca 100644
--- a/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java
+++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/ImportHostingAssets.java
@@ -89,6 +89,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assumptions.assumeThat;
import static org.springframework.util.FileCopyUtils.copyToByteArray;
+@Tag("migrationTest")
@Tag("importHostingAssets")
@DataJpaTest(properties = {
"spring.datasource.url=${HSADMINNG_POSTGRES_JDBC_URL:jdbc:tc:postgresql:15.5-bookworm:///importHostingAssetsTC}",
diff --git a/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java b/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java
index 6667c0ce..e97594bd 100644
--- a/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java
+++ b/src/test/java/net/hostsharing/hsadminng/hs/migration/LiquibaseCompatibilityIntegrationTest.java
@@ -34,7 +34,7 @@ import static org.springframework.test.context.jdbc.Sql.ExecutionPhase.BEFORE_TE
* During a release, the generated dump has to be committed to git and will be used in future test-runs
* until it gets replaced with a new dump at the next release.
*/
-@Tag("officeIntegrationTest")
+@Tag("migrationTest")
@DataJpaTest(properties = {
"spring.datasource.url=jdbc:tc:postgresql:15.5-bookworm:///liquibaseMigrationTestTC",
"hsadminng.superuser=${HSADMINNG_SUPERUSER:import-superuser@hostsharing.net}",
diff --git a/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java b/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java
index 561c0560..e8cdd946 100644
--- a/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java
+++ b/src/test/java/net/hostsharing/hsadminng/hs/scenarios/UseCase.java
@@ -46,6 +46,7 @@ import static org.junit.platform.commons.util.StringUtils.isNotBlank;
public abstract class UseCase> {
private static final HttpClient client = HttpClient.newHttpClient();
+ private static final int HTTP_TIMEOUT_SECONDS = 20; // FIXME: configurable in environment
private final ObjectMapper objectMapper = new ObjectMapper();
protected final ScenarioTest testSuite;
@@ -160,7 +161,7 @@ public abstract class UseCase> {
.GET()
.uri(new URI("http://localhost:" + testSuite.port + uriPath))
.header("Authorization", "Bearer " + ScenarioTest.RUN_AS_USER)
- .timeout(seconds(10))
+ .timeout(seconds(HTTP_TIMEOUT_SECONDS))
.build();
final var response = client.send(request, BodyHandlers.ofString());
return new HttpResponse(HttpMethod.GET, uriPath, null, response);
@@ -175,7 +176,7 @@ public abstract class UseCase> {
.uri(new URI("http://localhost:" + testSuite.port + uriPath))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + ScenarioTest.RUN_AS_USER)
- .timeout(seconds(10))
+ .timeout(seconds(HTTP_TIMEOUT_SECONDS))
.build();
final var response = client.send(request, BodyHandlers.ofString());
return new HttpResponse(HttpMethod.POST, uriPath, requestBody, response);
@@ -190,7 +191,7 @@ public abstract class UseCase> {
.uri(new URI("http://localhost:" + testSuite.port + uriPath))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + ScenarioTest.RUN_AS_USER)
- .timeout(seconds(10))
+ .timeout(seconds(HTTP_TIMEOUT_SECONDS))
.build();
final var response = client.send(request, BodyHandlers.ofString());
return new HttpResponse(HttpMethod.PATCH, uriPath, requestBody, response);
@@ -204,7 +205,7 @@ public abstract class UseCase> {
.uri(new URI("http://localhost:" + testSuite.port + uriPath))
.header("Content-Type", "application/json")
.header("Authorization", "Bearer " + ScenarioTest.RUN_AS_USER)
- .timeout(seconds(10))
+ .timeout(seconds(HTTP_TIMEOUT_SECONDS))
.build();
final var response = client.send(request, BodyHandlers.ofString());
return new HttpResponse(HttpMethod.DELETE, uriPath, null, response);
diff --git a/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java b/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java
index f12ea414..c3381f6c 100644
--- a/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java
+++ b/src/test/java/net/hostsharing/hsadminng/rbac/context/ContextIntegrationTests.java
@@ -5,6 +5,7 @@ import net.hostsharing.hsadminng.mapper.Array;
import net.hostsharing.hsadminng.mapper.StrictMapper;
import net.hostsharing.hsadminng.persistence.EntityManagerWrapper;
import net.hostsharing.hsadminng.rbac.test.JpaAttempt;
+import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -41,6 +42,11 @@ class ContextIntegrationTests {
@PersistenceContext
private EntityManager em;
+ @BeforeAll
+ static void disableRyuk() {
+ System.setProperty("testcontainers.ryuk.disabled", "true");
+ }
+
@Test
void defineWithoutHttpServletRequestUsesCallStack() {