[bisq-network/bisq] Add API test harness for Linux & OSX (#4366)

sqrrm notifications at github.com
Tue Aug 18 10:18:23 UTC 2020


@sqrrm approved this pull request.

ACK

> +    }
+
+    protected final void lockWallet() {
+        //noinspection ResultOfMethodCallIgnored
+        grpcStubs.walletsService.lockWallet(createLockWalletRequest());
+    }
+
+    protected final String getUnusedBtcAddress() {
+        return grpcStubs.walletsService.getFundingAddresses(createGetFundingAddressesRequest())
+                .getAddressBalanceInfoList()
+                .stream()
+                .filter(a -> a.getBalance() == 0 && a.getNumConfirmations() == 0)
+                .findFirst()
+                .get()
+                .getAddress();
+

```suggestion
```

> +        var request = createLockWalletRequest();
+        grpcStubs.walletsService.lockWallet(request);
+
+        Throwable exception = assertThrows(StatusRuntimeException.class, this::getBalance);
+        assertEquals("UNKNOWN: wallet is locked", exception.getMessage());
+    }
+
+    @Test
+    @Order(6)
+    public void testLockWalletWhenWalletAlreadyLockedShouldThrowException() {
+        var request = createLockWalletRequest();
+
+        Throwable exception = assertThrows(StatusRuntimeException.class, () ->
+                grpcStubs.walletsService.lockWallet(request));
+        assertEquals("UNKNOWN: wallet is already locked", exception.getMessage());
+

```suggestion
```

> @@ -55,6 +55,7 @@ public void start() throws InterruptedException, IOException {
                 + " -txindex=1"
                 + " -peerbloomfilters=1"
                 + " -debug=net"
+                + " -fallbackfee=0.0002"

I think this is reasonable. These tests should never be used to start a live bitcoind.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4366#pullrequestreview-469118829
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200818/a9fc0313/attachment-0001.html>


More information about the bisq-github mailing list