use random ports;

tests for the Daemon
This commit is contained in:
Andreas Penski (init) 2020-04-30 10:32:22 +02:00
parent aca3d2bd04
commit fcf3ff2bf1
7 changed files with 102 additions and 26 deletions

View file

@ -0,0 +1,26 @@
package de.kosit.validationtool.daemon;
import org.junit.Before;
import io.restassured.RestAssured;
/**
* Base for integration tests.
*
* @author Andreas Penski
*/
public abstract class BaseIT {
@Before
public void setup() {
final String port = System.getProperty("daemon.port");
if (port != null) {
RestAssured.port = Integer.valueOf(port);
}
final String baseHost = System.getProperty("daemon.host");
if (baseHost != null) {
RestAssured.baseURI = baseHost;
}
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
}
}