Skip to content

Commit e90d1cf

Browse files
committed
[#5] changing log level to be debug only on test profile
1 parent 4711efe commit e90d1cf

File tree

9 files changed

+20
-13
lines changed

9 files changed

+20
-13
lines changed

EurekaServer/src/main/resources/application.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,3 @@ server:
33
spring:
44
application:
55
name: EurekaServer
6-
logging:
7-
level:
8-
org.springframework: DEBUG
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
logging:
2+
level:
3+
org.springframework: DEBUG
4+
reactor: DEBUG

SimpleMicroservice/src/main/resources/application.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,3 @@ eureka:
77
defaultZone: http://localhost:8761/eureka/
88
server:
99
port: 8080
10-
logging:
11-
level:
12-
org.springframework: DEBUG
13-
reactor: DEBUG
14-
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
logging:
2+
level:
3+
org.springframework: DEBUG
4+
reactor: DEBUG

SpringKubeGateway/src/main/resources/application.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ eureka:
77
defaultZone: http://localhost:8761/eureka/
88
server:
99
port: 80
10-
logging:
11-
level:
12-
org.springframework: DEBUG
13-
reactor: DEBUG

SpringKubeGateway/src/test/kotlin/org/learning/by/example/SpringKubeGateway/GatewayApplicationTests.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ package org.learning.by.example.SpringKubeGateway
33
import org.junit.Test
44
import org.junit.runner.RunWith
55
import org.springframework.boot.test.context.SpringBootTest
6+
import org.springframework.test.context.ActiveProfiles
67
import org.springframework.test.context.junit4.SpringRunner
78

89
@RunWith(SpringRunner::class)
910
@SpringBootTest
11+
@ActiveProfiles("test")
1012
class GatewayApplicationTests {
1113

1214
@Test
1315
fun contextLoads() {
1416
}
1517

1618
}
19+

SpringKubeGateway/src/test/kotlin/org/learning/by/example/SpringKubeGateway/GatewayIntegrationTests.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import org.springframework.boot.web.server.LocalServerPort
1414
import org.springframework.cloud.client.DefaultServiceInstance
1515
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient
1616
import org.springframework.http.HttpStatus
17+
import org.springframework.test.context.ActiveProfiles
1718
import org.springframework.test.context.junit4.SpringRunner
1819
import org.springframework.test.web.reactive.server.WebTestClient
1920

@@ -23,6 +24,7 @@ import org.springframework.test.web.reactive.server.WebTestClient
2324
webEnvironment = RANDOM_PORT, properties = [
2425
"eureka.client.enabled=false",
2526
"spring.cloud.discovery.client.simple.instances.simplemicroservice[0].uri=http://localhost"])
27+
@ActiveProfiles("test")
2628
class GatewayIntegrationTests {
2729

2830
@LocalServerPort
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package org.learning.by.example.SpringKubeGateway
22

33
import org.junit.Test
4+
import org.springframework.test.context.ActiveProfiles
45

6+
@ActiveProfiles("test")
57
class MainKtTest {
68

79
@Test
810
fun main() {
911
main(arrayOf())
1012
}
11-
}
13+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
logging:
2+
level:
3+
org.springframework: DEBUG
4+
reactor: DEBUG

0 commit comments

Comments
 (0)