mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
use random ports;
tests for the Daemon
This commit is contained in:
parent
aca3d2bd04
commit
fcf3ff2bf1
7 changed files with 102 additions and 26 deletions
26
src/test/java/de/kosit/validationtool/daemon/BaseIT.java
Normal file
26
src/test/java/de/kosit/validationtool/daemon/BaseIT.java
Normal 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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue