Skip to content

Commit

Permalink
properties file for integration testing is optional when the
Browse files Browse the repository at this point in the history
authorization is disabled
  • Loading branch information
gsergiu committed Feb 24, 2025
1 parent 98ab753 commit 7cdcc70
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import eu.europeana.api.set.integration.exception.TechnicalRuntimeException;

public class SetIntegrationConfiguration {
Expand All @@ -16,6 +17,7 @@ public class SetIntegrationConfiguration {
protected static final String PROP_OAUTH_REQUEST_PARAMS_CREATOR_ENTITYSET = "oauth.token.request.params.creator.entityset";
protected static final String PROP_OAUTH_REQUEST_PARAMS_PUBLISHER = "oauth.token.request.params.publisher";
protected static final String PROP_OAUTH_REQUEST_PARAMS_ADMIN = "oauth.token.request.params.admin";
protected static final Logger LOG = LogManager.getLogger(SetIntegrationConfiguration.class);

private static Properties properties = null;
private static SetIntegrationConfiguration singleton;
Expand Down Expand Up @@ -47,8 +49,8 @@ public synchronized void loadProperties() {
properties = new Properties();
InputStream resourceAsStream = getClass().getResourceAsStream(SET_INTEGRATION_TESTING_PROPERTIES_FILE);
if (resourceAsStream == null) {
throw new TechnicalRuntimeException(
"No properties file found in classpath! " + SET_INTEGRATION_TESTING_PROPERTIES_FILE);
LOG.warn("No properties file found for initialization of integration tests!");
return;
}

getProperties().load(resourceAsStream);
Expand Down

0 comments on commit 7cdcc70

Please sign in to comment.