Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFCORE-6812 Allow validating multiple XML files #6051

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
package org.jboss.as.subsystem.test;

import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;

import org.jboss.as.controller.Extension;
import org.jboss.as.controller.PathAddress;
Expand Down Expand Up @@ -112,6 +114,26 @@ protected String getSubsystemXml(String configId) throws IOException {

}

/**
* Retrieves XML content from multiple resources identified by the given list of configuration IDs.
*
* @param configIds A list of configuration IDs, each identifying a resource whose XML content will be retrieved.
* @return A concatenated string containing the XML content of all resources identified by the configIds.
* @throws IOException If an I/O error occurs while reading any of the resources.
*/

protected String getSubsystemXml(List<String> configIds) throws IOException {
return configIds.stream()
.map(configId -> {
try {
return readResource(configId);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
})
.collect(Collectors.joining());
}

/**
* Get the comparison subsystem xml to compare marshalled output
* <p>
Expand Down