-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21661 from aloubyansky/extension-yaml-parsing
Make sure quarkus-extension.yaml can be parsed using CatalogMapperHelper
- Loading branch information
Showing
4 changed files
with
86 additions
and
10 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
27 changes: 27 additions & 0 deletions
27
...ojects/tools/registry-client/src/test/java/io/quarkus/registry/catalog/ExtensionTest.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,27 @@ | ||
package io.quarkus.registry.catalog; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import io.quarkus.maven.ArtifactCoords; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
import java.util.Map; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class ExtensionTest { | ||
|
||
static Path baseDir = Paths.get(System.getProperty("user.dir")).toAbsolutePath() | ||
.resolve("src/test/resources/extension"); | ||
|
||
@Test | ||
void deserializeYamlFile() throws Exception { | ||
|
||
final Path extYaml = baseDir.resolve("quarkus-extension.yaml"); | ||
assertThat(extYaml).exists(); | ||
|
||
final Extension e = Extension.fromFile(extYaml); | ||
assertThat(e.getArtifact()).isEqualTo(new ArtifactCoords("io.quarkus", "quarkus-resteasy-reactive", "999-PLACEHOLDER")); | ||
final Map<String, Object> metadata = e.getMetadata(); | ||
assertThat(metadata.get("short-name")).isEqualTo("resteasy-reactive"); | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...endent-projects/tools/registry-client/src/test/resources/extension/quarkus-extension.yaml
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,41 @@ | ||
--- | ||
name: "RESTEasy Reactive" | ||
artifact: "io.quarkus:quarkus-resteasy-reactive:999-PLACEHOLDER" | ||
metadata: | ||
short-name: "resteasy-reactive" | ||
keywords: | ||
- "jaxrs" | ||
- "web" | ||
- "rest" | ||
categories: | ||
- "web" | ||
- "reactive" | ||
status: "stable" | ||
guide: "https://quarkus.io/guides/resteasy-reactive" | ||
codestart: | ||
name: "resteasy-reactive" | ||
languages: | ||
- "java" | ||
- "kotlin" | ||
- "scala" | ||
artifact: "io.quarkus:quarkus-project-core-extension-codestarts::jar:999-SNAPSHOT" | ||
config: | ||
- "quarkus.resteasy-reactive." | ||
built-with-quarkus-core: "999-SNAPSHOT" | ||
capabilities: | ||
provides: | ||
- "io.quarkus.rest" | ||
- "io.quarkus.resteasy.reactive" | ||
extension-dependencies: | ||
- "io.quarkus:quarkus-resteasy-reactive-common" | ||
- "io.quarkus:quarkus-mutiny" | ||
- "io.quarkus:quarkus-smallrye-context-propagation" | ||
- "io.quarkus:quarkus-vertx" | ||
- "io.quarkus:quarkus-arc" | ||
- "io.quarkus:quarkus-netty" | ||
- "io.quarkus:quarkus-vertx-http" | ||
- "io.quarkus:quarkus-core" | ||
- "io.quarkus:quarkus-jsonp" | ||
description: "Reactive implementation of JAX-RS with additional features. This extension\ | ||
\ is not compatible with the quarkus-resteasy extension, or any of the extensions\ | ||
\ that depend on it." |