add get-blockheight to status controller

This commit is contained in:
Carsten Otto
2021-11-27 11:56:13 +01:00
parent 9800c2ac5b
commit c9e514e425
5 changed files with 38 additions and 0 deletions

View File

@@ -83,4 +83,11 @@ class StatusControllerTest {
when(channelService.getAllLocalChannels()).thenReturn(Stream.of(CLOSED_CHANNEL_2, CLOSED_CHANNEL));
assertThat(statusController.getPubkeysForAllChannels().pubkeys()).containsExactly(PUBKEY_2.toString());
}
@Test
void getBlockHeight() {
when(ownNodeService.getBlockHeight()).thenReturn(123_456);
assertThat(statusController.getBlockHeight()).isEqualTo(123_456);
verify(metrics).mark(argThat(name -> name.endsWith(".getBlockHeight")));
}
}