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

@@ -46,6 +46,13 @@ class StatusControllerIT {
.andExpect(content().string("true"));
}
@Test
void getBlockHeight() throws Exception {
when(ownNodeService.getBlockHeight()).thenReturn(123_456);
mockMvc.perform(get(PREFIX + "/block-height"))
.andExpect(content().string("123456"));
}
@Test
void getPubkeysForOpenChannels() throws Exception {
when(channelService.getOpenChannels()).thenReturn(Set.of(LOCAL_OPEN_CHANNEL_TO_NODE_3, LOCAL_OPEN_CHANNEL));