mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-25 00:44:22 +01:00
add "reset graph cache" endpoint
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package de.cotto.lndmanagej.controller;
|
||||
|
||||
import de.cotto.lndmanagej.controller.dto.MultiPathPaymentDto;
|
||||
import de.cotto.lndmanagej.grpc.GrpcGraph;
|
||||
import de.cotto.lndmanagej.model.Coins;
|
||||
import de.cotto.lndmanagej.model.HexString;
|
||||
import de.cotto.lndmanagej.pickhardtpayments.MultiPathPaymentSender;
|
||||
@@ -23,6 +24,7 @@ import static de.cotto.lndmanagej.pickhardtpayments.model.MultiPathPaymentFixtur
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.lenient;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@@ -42,6 +44,9 @@ class PickhardtPaymentsControllerTest {
|
||||
@Mock
|
||||
private PaymentStatusStream paymentStatusStream;
|
||||
|
||||
@Mock
|
||||
private GrpcGraph grpcGraph;
|
||||
|
||||
private final PaymentStatus paymentStatus = new PaymentStatus(HexString.EMPTY);
|
||||
|
||||
@BeforeEach
|
||||
@@ -106,4 +111,10 @@ class PickhardtPaymentsControllerTest {
|
||||
assertThat(controller.send(PUBKEY, PUBKEY_2, 123, feeRateWeight))
|
||||
.isEqualTo(MultiPathPaymentDto.fromModel(MULTI_PATH_PAYMENT));
|
||||
}
|
||||
|
||||
@Test
|
||||
void resetCache() {
|
||||
controller.resetGraph();
|
||||
verify(grpcGraph).resetCache();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user