-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apicurio Registry direct dependency management, remove Nimbus JOSE mg…
…mt (#1398) - CVE-free version of Nimbus JOSE managed by Quarkus - Remove use of quarkus-kafka-clients and quarkus-apicurio-registry-avro - Add Apicurio resource manager and test container to replace dev services previously provided by quarkus-apicurio-registry-avro Signed-off-by: Michael Edgar <[email protected]>
- Loading branch information
Showing
5 changed files
with
77 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...va/com/github/streamshub/console/kafka/systemtest/deployment/ApicurioResourceManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.github.streamshub.console.kafka.systemtest.deployment; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.io.UncheckedIOException; | ||
import java.util.Map; | ||
|
||
import org.slf4j.LoggerFactory; | ||
import org.testcontainers.containers.GenericContainer; | ||
import org.testcontainers.containers.output.Slf4jLogConsumer; | ||
import org.testcontainers.containers.wait.strategy.Wait; | ||
|
||
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager; | ||
|
||
public class ApicurioResourceManager implements QuarkusTestResourceLifecycleManager { | ||
|
||
GenericContainer<?> apicurio; | ||
|
||
@Override | ||
@SuppressWarnings("resource") | ||
public Map<String, String> start() { | ||
int port = 8080; | ||
String apicurioImage; | ||
|
||
try (InputStream in = getClass().getResourceAsStream("/Dockerfile.apicurio"); | ||
BufferedReader reader = new BufferedReader(new InputStreamReader(in))) { | ||
apicurioImage = reader.readLine().substring("FROM ".length()); | ||
} catch (IOException e) { | ||
throw new UncheckedIOException(e); | ||
} | ||
|
||
apicurio = new GenericContainer<>(apicurioImage) | ||
.withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger("systemtests.apicurio"), true)) | ||
.withExposedPorts(port) | ||
.waitingFor(Wait.forListeningPort()); | ||
|
||
apicurio.start(); | ||
|
||
String urlTemplate = "http://localhost:%d/apis/registry/v2/"; | ||
var apicurioUrl = urlTemplate.formatted(apicurio.getMappedPort(port)); | ||
return Map.of("console.test.apicurio-url", apicurioUrl); | ||
} | ||
|
||
@Override | ||
public void stop() { | ||
apicurio.stop(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM quay.io/apicurio/apicurio-registry-mem:2.6.7.Final | ||
# No operations, this is only a placeholder used to manage the image | ||
# version via dependabot. The FROM statement is always expected to | ||
# present on the first line of this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters