Pull request #94: dev mode features, exception generalisation
Merge in RED/redaction-service from feature/ruleset-integration to master * commit 'c2669ab56843f3ec335cfb1cd7d1e59dc828fb98': fixed tests fixed tests dev mode features, exception generalisation
This commit is contained in:
commit
f087d4afdb
@ -1,10 +1,8 @@
|
|||||||
package com.iqser.red.service.redaction.v1.server.client;
|
package com.iqser.red.service.redaction.v1.server.client;
|
||||||
|
|
||||||
|
import com.iqser.red.service.configuration.v1.api.resource.DictionaryResource;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
|
||||||
import com.iqser.red.service.configuration.v1.api.resource.DictionaryResource;
|
@FeignClient(name = "DictionaryResource", url = "${configuration-service.url}")
|
||||||
import com.iqser.red.service.configuration.v1.api.resource.RulesResource;
|
|
||||||
|
|
||||||
@FeignClient(name = "DictionaryResource", url = "http://" + RulesResource.SERVICE_NAME + ":8080")
|
|
||||||
public interface DictionaryClient extends DictionaryResource {
|
public interface DictionaryClient extends DictionaryResource {
|
||||||
}
|
}
|
||||||
@ -1,9 +1,8 @@
|
|||||||
package com.iqser.red.service.redaction.v1.server.client;
|
package com.iqser.red.service.redaction.v1.server.client;
|
||||||
|
|
||||||
|
import com.iqser.red.service.configuration.v1.api.resource.RulesResource;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
|
||||||
import com.iqser.red.service.configuration.v1.api.resource.RulesResource;
|
@FeignClient(name = RulesResource.SERVICE_NAME, url = "${configuration-service.url}")
|
||||||
|
|
||||||
@FeignClient(name = RulesResource.SERVICE_NAME, url = "http://" + RulesResource.SERVICE_NAME + ":8080")
|
|
||||||
public interface RulesClient extends RulesResource {
|
public interface RulesClient extends RulesResource {
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ public class RedactionController implements RedactionResource {
|
|||||||
classifiedDoc.getRulesVersion(),
|
classifiedDoc.getRulesVersion(),
|
||||||
redactionRequest.getRuleSetId());
|
redactionRequest.getRuleSetId());
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
throw new RedactionException(e);
|
throw new RedactionException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
server:
|
||||||
|
port: 8083
|
||||||
|
|
||||||
|
configuration-service.url: "http://localhost:8081"
|
||||||
@ -1,6 +1,8 @@
|
|||||||
info:
|
info:
|
||||||
description: Redaction Service Server V1
|
description: Redaction Service Server V1
|
||||||
|
|
||||||
|
configuration-service.url: "http://configuration-service-v1:8080"
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
|
|||||||
@ -58,10 +58,10 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.DEFINED_PORT;
|
import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT;
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(webEnvironment = DEFINED_PORT)
|
@SpringBootTest(webEnvironment = RANDOM_PORT)
|
||||||
public class RedactionIntegrationTest {
|
public class RedactionIntegrationTest {
|
||||||
|
|
||||||
private static final String RULES = loadFromClassPath("drools/rules.drl");
|
private static final String RULES = loadFromClassPath("drools/rules.drl");
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
|
configuration-service.url: "http://configuration-service-v1:8080"
|
||||||
|
|
||||||
ribbon:
|
ribbon:
|
||||||
ConnectTimeout: 600000
|
ConnectTimeout: 600000
|
||||||
ReadTimeout: 600000
|
ReadTimeout: 600000
|
||||||
|
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
main:
|
main:
|
||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user