diff options
Diffstat (limited to 'eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils')
2 files changed, 4 insertions, 1 deletions
diff --git a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckNoKeyStoreFactoryTest.java b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckNoKeyStoreFactoryTest.java index 92c88544..9d3c0d02 100644 --- a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckNoKeyStoreFactoryTest.java +++ b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckNoKeyStoreFactoryTest.java @@ -8,6 +8,8 @@ import org.mockito.Mock; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Status; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -16,6 +18,7 @@ import at.gv.egiz.eaaf.utils.springboot.actuator.HsmFacadeProviderHealthCheck; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/spring/test_spring_actuator.xml") +@DirtiesContext(classMode = ClassMode.BEFORE_CLASS) public class HsmFacadeProviderHealthCheckNoKeyStoreFactoryTest { @Mock diff --git a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckTest.java b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckTest.java index 29feee5e..d6bdf26a 100644 --- a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckTest.java +++ b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/actuator/HsmFacadeProviderHealthCheckTest.java @@ -88,7 +88,7 @@ public class HsmFacadeProviderHealthCheckTest { Health status = check.health(); //validate result - Assert.assertEquals("wrong statusCode", Status.UNKNOWN.getCode(), status.getStatus().getCode()); + Assert.assertEquals("wrong statusCode", Status.OUT_OF_SERVICE.getCode(), status.getStatus().getCode()); } |