1
1
package com .cp .compiler .healths ;
2
2
3
- import com .cp .compiler .healthchecks .ContainerHealthIndicator ;
3
+ import com .cp .compiler .healthchecks .ContainerizationHealthIndicator ;
4
4
import com .cp .compiler .services .containers .ContainerService ;
5
5
import org .junit .jupiter .api .Assertions ;
6
6
import org .junit .jupiter .api .Test ;
@@ -22,7 +22,7 @@ class ContainerHealthIndicatorTests {
22
22
@ Test
23
23
void shouldReturnHealthUp () {
24
24
// Given
25
- var healthIndicator = new ContainerHealthIndicator (containerService );
25
+ var healthIndicator = new ContainerizationHealthIndicator (containerService );
26
26
Mockito .when (containerService .isUp ()).thenReturn (true );
27
27
Mockito .when (containerService .getContainerizationName ()).thenReturn ("Docker" );
28
28
@@ -31,12 +31,13 @@ void shouldReturnHealthUp() {
31
31
32
32
// Then
33
33
Assertions .assertEquals (Health .up ().build ().getStatus (), health .getStatus ());
34
+ Assertions .assertNotNull (health .getDetails ());
34
35
}
35
36
36
37
@ Test
37
38
void shouldReturnHealthDown () {
38
39
// Given
39
- var healthIndicator = new ContainerHealthIndicator (containerService );
40
+ var healthIndicator = new ContainerizationHealthIndicator (containerService );
40
41
Mockito .when (containerService .isUp ()).thenReturn (false );
41
42
Mockito .when (containerService .getContainerizationName ()).thenReturn ("Docker" );
42
43
@@ -45,5 +46,6 @@ void shouldReturnHealthDown() {
45
46
46
47
// Then
47
48
Assertions .assertEquals (Health .down ().build ().getStatus (), health .getStatus ());
49
+ Assertions .assertNotNull (health .getDetails ());
48
50
}
49
51
}
0 commit comments