sergehuber commented on code in PR #715:
URL: https://github.com/apache/unomi/pull/715#discussion_r2428311658
##########
itests/src/test/java/org/apache/unomi/itests/BaseIT.java:
##########
@@ -223,12 +256,34 @@ protected void refreshPersistence(final Class<? extends
Item>... classes) throws
@Override
public MavenArtifactUrlReference getKarafDistribution() {
- return
CoreOptions.maven().groupId("org.apache.unomi").artifactId("unomi").versionAsInProject().type("tar.gz");
+ return
maven().groupId("org.apache.unomi").artifactId("unomi").versionAsInProject().type("tar.gz");
}
@Configuration
public Option[] config() {
System.out.println("==== Configuring container");
+
+ searchEngine = System.getProperty(SEARCH_ENGINE_PROPERTY,
SEARCH_ENGINE_ELASTICSEARCH);
+ System.out.println("Search Engine: " + searchEngine);
+
+ // Define features option based on search engine
+ Option featuresOption;
+ if (SEARCH_ENGINE_ELASTICSEARCH.equals(searchEngine)) {
+ featuresOption = features(maven().groupId("org.apache.unomi")
+
.artifactId("unomi-kar").versionAsInProject().type("xml").classifier("features"),
+ "unomi-persistence-elasticsearch", "unomi-services",
+ "unomi-router-karaf-feature", "unomi-groovy-actions",
+ "unomi-web-applications", "unomi-rest-ui",
"unomi-healthcheck", "cdp-graphql-feature");
+ } else if (SEARCH_ENGINE_OPENSEARCH.equals(searchEngine)) {
+ featuresOption = features(maven().groupId("org.apache.unomi")
+
.artifactId("unomi-kar").versionAsInProject().type("xml").classifier("features"),
+ "unomi-persistence-opensearch", "unomi-services",
+ "unomi-router-karaf-feature", "unomi-groovy-actions",
+ "unomi-web-applications", "unomi-rest-ui",
"unomi-healthcheck", "cdp-graphql-feature");
+ } else {
+ throw new IllegalArgumentException("Unknown search engine: " +
searchEngine);
+ }
Review Comment:
I've changed the code since then, and despite having two similar lists, I
tried refactoring it and it made it harder to read and maintain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]