remove "get alias" from legacy controller

This commit is contained in:
Carsten Otto
2021-11-20 19:53:47 +01:00
parent f84afefbe3
commit 59d984ec96
3 changed files with 1 additions and 26 deletions

View File

@@ -26,7 +26,6 @@ import static de.cotto.lndmanagej.model.ForceClosingChannelFixtures.FORCE_CLOSIN
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL;
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL_3;
import static de.cotto.lndmanagej.model.LocalOpenChannelFixtures.LOCAL_OPEN_CHANNEL_TO_NODE_3;
import static de.cotto.lndmanagej.model.NodeFixtures.ALIAS;
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY;
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY_2;
import static de.cotto.lndmanagej.model.PubkeyFixtures.PUBKEY_3;
@@ -46,6 +45,7 @@ class LegacyControllerIT {
private MockMvc mockMvc;
@MockBean
@SuppressWarnings("unused")
private NodeService nodeService;
@MockBean
@@ -64,17 +64,6 @@ class LegacyControllerIT {
@SuppressWarnings("unused")
private Metrics metrics;
@Test
void getAlias() throws Exception {
when(nodeService.getAlias(PUBKEY)).thenReturn(ALIAS);
mockMvc.perform(get(PUBKEY_BASE + "/alias")).andExpect(content().string(ALIAS));
}
@Test
void getAlias_error() throws Exception {
mockMvc.perform(get("/legacy/node/xxx/alias")).andExpect(status().isBadRequest());
}
@Test
void getOpenChannelIds_for_peer() throws Exception {
when(channelService.getOpenChannelsWith(PUBKEY)).thenReturn(Set.of(LOCAL_OPEN_CHANNEL, LOCAL_OPEN_CHANNEL_3));