blob: 344e733d39632a9fbdf31593cb36505ac1f00e34 [file] [log] [blame]
package org.eclipse.basyx.components.MongoDBAASServer;
import org.eclipse.basyx.components.configuration.BaSyxContextConfiguration;
import org.eclipse.basyx.components.configuration.BaSyxDockerConfiguration;
import org.junit.BeforeClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Tests the docker container using the test suite
*
* @author espen
*
*/
public class ITAASServer extends AASServerSuite {
private static String URL;
@Override
protected String getURL() {
return URL;
}
private static Logger logger = LoggerFactory.getLogger(AASServerSuite.class);
@BeforeClass
public static void setUpClass() {
logger.info("Running integration test...");
logger.info("Loading servlet configuration");
// Load the servlet configuration inside of the docker configuration from
// properties file
BaSyxContextConfiguration contextConfig = new BaSyxContextConfiguration();
contextConfig.loadFromResource(BaSyxContextConfiguration.DEFAULT_CONFIG_PATH);
// Load the docker environment configuration from properties file
logger.info("Loading docker configuration");
BaSyxDockerConfiguration dockerConfig = new BaSyxDockerConfiguration();
dockerConfig.loadFromResource(BaSyxDockerConfiguration.DEFAULT_CONFIG_PATH);
URL = "http://localhost:" + dockerConfig.getHostPort() + contextConfig.getContextPath();
}
}