mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-22 23:44:21 +01:00
remove "get alias" from legacy controller
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user