Skip to content

Commit

Permalink
Fix platform and core version assumption
Browse files Browse the repository at this point in the history
(cherry picked from commit c835ef5)
  • Loading branch information
rsvoboda authored and jedla97 committed Oct 8, 2024
1 parent ee028cb commit 443a04d
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,17 @@ private void validateExtensions(QuarkusCliRestService app, JsonPath json) {
.map(payloadExtension -> mapToGA(payloadExtension.getGroupId(), payloadExtension.getArtifactId()))
.collect(Collectors.toList());
assertEquals(pomDependencyGAs, payloadExtensionGAs);
List<PayloadExtension> extensionsWithMismatchedVersion = payloadExtensions.stream()
.filter(extension -> !QUARKUS_EXTENSION_VERSION_PATTERN.matcher(extension.getVersion()).matches())
.collect(Collectors.toList());
assertEquals(0, extensionsWithMismatchedVersion.size(),
String.format("All extensions versions must match pattern: '%s'. Offending extensions: %s",
QUARKUS_EXTENSION_VERSION_PATTERN.pattern(), extensionsWithMismatchedVersion));

// RHBQ doesn't guarantee the same version of the platform and core extensions
boolean isRHBQ = QuarkusProperties.getVersion().contains("redhat");
if (!isRHBQ) {
List<PayloadExtension> extensionsWithMismatchedVersion = payloadExtensions.stream()
.filter(extension -> !QUARKUS_EXTENSION_VERSION_PATTERN.matcher(extension.getVersion()).matches())
.collect(Collectors.toList());
assertEquals(0, extensionsWithMismatchedVersion.size(),
String.format("All extensions versions must match pattern: '%s'. Offending extensions: %s",
QUARKUS_EXTENSION_VERSION_PATTERN.pattern(), extensionsWithMismatchedVersion));
}
}

private List<Dependency> getPomDependencies(QuarkusCliRestService app) {
Expand Down

0 comments on commit 443a04d

Please sign in to comment.