Skip to content

Commit

Permalink
Fix platform and core version assumption
Browse files Browse the repository at this point in the history
  • Loading branch information
rsvoboda committed Jul 22, 2024
1 parent 569452e commit c835ef5
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,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 c835ef5

Please sign in to comment.