mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-07-04 10:37:32 +02:00
Notify user about results of manually executed health check (#2044)
When manually starting health checks, the user should always receive a notification about the status, whether successful or not.
This commit is contained in:
@@ -119,6 +119,7 @@ class HealthCheckerTest {
|
||||
|
||||
@Test
|
||||
void shouldComputeLightChecks() {
|
||||
when(subject.getPrincipal()).thenReturn("trillian");
|
||||
when(healthCheck1.check(repository)).thenReturn(HealthCheckResult.unhealthy(createFailure("error1")));
|
||||
when(healthCheck2.check(repository)).thenReturn(HealthCheckResult.unhealthy(createFailure("error2")));
|
||||
|
||||
@@ -261,8 +262,8 @@ class HealthCheckerTest {
|
||||
|
||||
checker.fullCheck(repositoryId);
|
||||
|
||||
verify(notificationSender, never()).send(any());
|
||||
verify(notificationSender,times(1)).send(any(), eq("trillian"));
|
||||
verify(notificationSender, times(1)).send(any());
|
||||
verify(notificationSender, never()).send(any(), eq("trillian"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -274,7 +275,7 @@ class HealthCheckerTest {
|
||||
|
||||
checker.fullCheck(repositoryId);
|
||||
|
||||
verify(notificationSender).send(any(), eq("trillian"));
|
||||
verify(notificationSender).send(any());
|
||||
verify(notificationSender).send(any(), eq("Arthur"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user