File tree 5 files changed +43
-16
lines changed
5 files changed +43
-16
lines changed Original file line number Diff line number Diff line change 20
20
<dependency >
21
21
<groupId >io.github.mucsi96</groupId >
22
22
<artifactId >kubetools</artifactId >
23
- <version >1.18 -SNAPSHOT</version >
23
+ <version >1.19 -SNAPSHOT</version >
24
24
</dependency >
25
25
<dependency >
26
26
<groupId >org.springframework.boot</groupId >
Original file line number Diff line number Diff line change
1
+ management :
2
+ server :
3
+ port : ${SPRING_ACTUATOR_PORT}
4
+ endpoints :
5
+ web :
6
+ exposure :
7
+ include : " *"
1
8
spring :
2
9
boot :
3
10
admin :
Original file line number Diff line number Diff line change 1
1
server :
2
2
forward-headers-strategy : framework
3
3
shutdown : graceful
4
+ management :
5
+ endpoint :
6
+ health :
7
+ show-details : always
8
+ probes :
9
+ enabled : true
4
10
spring :
5
11
security :
6
12
oauth2 :
@@ -28,18 +34,6 @@ spring:
28
34
properties :
29
35
hibernate :
30
36
dialect : org.hibernate.dialect.PostgreSQLDialect
31
- management :
32
- server :
33
- port : ${SPRING_ACTUATOR_PORT}
34
- endpoints :
35
- web :
36
- exposure :
37
- include : " *"
38
- endpoint :
39
- health :
40
- show-details : always
41
- probes :
42
- enabled : true
43
37
logging :
44
38
level :
45
39
com :
Original file line number Diff line number Diff line change
1
+ package mucsi96 .traininglog ;
2
+
3
+ import static org .assertj .core .api .Assertions .assertThat ;
4
+ import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
5
+
6
+ import org .junit .jupiter .api .Test ;
7
+ import org .springframework .mock .web .MockHttpServletResponse ;
8
+
9
+ import com .jayway .jsonpath .DocumentContext ;
10
+ import com .jayway .jsonpath .JsonPath ;
11
+
12
+ public class HealthTest extends BaseIntegrationTest {
13
+
14
+ @ Test
15
+ void retunrs_status () throws Exception {
16
+ MockHttpServletResponse response = mockMvc .perform (get ("/actuator/health/liveness" )).andReturn ().getResponse ();
17
+
18
+ assertThat (response .getStatus ()).isEqualTo (200 );
19
+ DocumentContext body = JsonPath .parse (response .getContentAsString ());
20
+ assertThat (body .read ("$.status" , String .class )).isEqualTo ("UP" );
21
+ }
22
+ }
Original file line number Diff line number Diff line change 1
1
server :
2
2
forward-headers-strategy : framework
3
+ management :
4
+ endpoint :
5
+ health :
6
+ show-details : always
7
+ probes :
8
+ enabled : true
3
9
spring :
4
10
autoconfigure :
5
11
exclude :
@@ -27,7 +33,5 @@ spring:
27
33
show-sql : true
28
34
properties :
29
35
hibernate :
36
+ dialect : org.hibernate.dialect.H2Dialect
30
37
format-sql : true
31
- management :
32
- server :
33
- port : 8082
You can’t perform that action at this time.
0 commit comments