From deebc6ccab973144b458adff74275f9f140a4d41 Mon Sep 17 00:00:00 2001 From: Antoine Rey <antoine.rey@gmail.com> Date: Fri, 10 Feb 2017 19:42:39 +0100 Subject: [PATCH] Fix #40 Remove error logs from ApiGatewayApplicationTests (#45) --- .../samples/petclinic/api/ApiGatewayApplicationTests.java | 2 ++ .../src/test/resources/bootstrap-test.yml | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 spring-petclinic-api-gateway/src/test/resources/bootstrap-test.yml diff --git a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java index 3ea1424c..e8302166 100644 --- a/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java +++ b/spring-petclinic-api-gateway/src/test/java/org/springframework/samples/petclinic/api/ApiGatewayApplicationTests.java @@ -3,9 +3,11 @@ package org.springframework.samples.petclinic.api; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) +@ActiveProfiles("test") @SpringBootTest public class ApiGatewayApplicationTests { diff --git a/spring-petclinic-api-gateway/src/test/resources/bootstrap-test.yml b/spring-petclinic-api-gateway/src/test/resources/bootstrap-test.yml new file mode 100644 index 00000000..cb8e4f5f --- /dev/null +++ b/spring-petclinic-api-gateway/src/test/resources/bootstrap-test.yml @@ -0,0 +1,2 @@ +spring.cloud.config.enabled: false +eureka.client.enabled: false -- GitLab