mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-23 07:54:24 +01:00
remove legacy endpoint
This commit is contained in:
@@ -11,21 +11,14 @@ import org.springframework.test.web.servlet.MockMvc;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID;
|
||||
import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID_3;
|
||||
import static de.cotto.lndmanagej.model.CoopClosedChannelFixtures.CLOSED_CHANNEL_3;
|
||||
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.PubkeyFixtures.PUBKEY;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
@WebMvcTest(controllers = LegacyController.class)
|
||||
class LegacyControllerIT {
|
||||
private static final String PUBKEY_BASE = "/legacy/node/" + PUBKEY;
|
||||
|
||||
@Autowired
|
||||
private MockMvc mockMvc;
|
||||
|
||||
@@ -40,13 +33,6 @@ class LegacyControllerIT {
|
||||
@SuppressWarnings("unused")
|
||||
private Metrics metrics;
|
||||
|
||||
@Test
|
||||
void getAllChannelIds_for_peer() throws Exception {
|
||||
when(channelService.getAllChannelsWith(PUBKEY)).thenReturn(Set.of(LOCAL_OPEN_CHANNEL, CLOSED_CHANNEL_3));
|
||||
mockMvc.perform(get(PUBKEY_BASE + "/all-channels"))
|
||||
.andExpect(content().string(CHANNEL_ID + "\n" + CHANNEL_ID_3));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getOpenChannelIdsPretty() throws Exception {
|
||||
when(channelService.getOpenChannels()).thenReturn(Set.of(LOCAL_OPEN_CHANNEL, LOCAL_OPEN_CHANNEL_3));
|
||||
|
||||
Reference in New Issue
Block a user