From 96559568c1a2de623c17c54e27791dc16702f2a8 Mon Sep 17 00:00:00 2001 From: premek <1145361+premek@users.noreply.github.com> Date: Mon, 15 Nov 2021 18:13:28 +0100 Subject: [PATCH] update test instructions to use configured wallet RPC port --- README.md | 6 +++--- src/HavenoDaemon.test.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f205b16d..da3614da 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ Running the [top-level API tests](./src/HavenoDaemon.test.tsx) is a great way to 4. In a new terminal, start an instance of monero-wallet-rpc at port 38084. This wallet will be automatically funded in order to fund Alice and Bob during the tests.
For example: `cd ~/git/haveno/.localnet/ && ./monero-wallet-rpc --daemon-address http://localhost:38081 --daemon-login superuser:abctesting123 --stagenet --rpc-bind-port 38084 --rpc-login rpc_user:abc123 --wallet-dir ./ --rpc-access-control-origins http://localhost:8080` 5. `cd haveno-ui-poc` 6. `npm install` -7. Modify test config as needed in [HavenoDaemon.test.ts](./src/HavenoDaemon.test.ts).
The tests need to know the port of Alice's wallet, which is printed to Alice's console. Currently the port needs to be manually copied to the test configuration. -8. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name. +7. `npm test` to run all tests or `npm run test -- -t 'my test'` to run tests by name. + ## How to Update the Protobuf Client @@ -39,4 +39,4 @@ If the protobuf definitions in haveno-dex/haveno are updated, the typescript imp 1. Copy grpc.proto and pb.proto from Haveno's [protobuf definitions](https://github.com/haveno-dex/haveno/tree/master/proto/src/main/proto) to ./config. 2. Install protobuf for your system, e.g. on mac: `brew install protobuf` -3. `./bin/build_protobuf.sh` \ No newline at end of file +3. `./bin/build_protobuf.sh` diff --git a/src/HavenoDaemon.test.ts b/src/HavenoDaemon.test.ts index 11e47685..d53762a1 100644 --- a/src/HavenoDaemon.test.ts +++ b/src/HavenoDaemon.test.ts @@ -29,7 +29,7 @@ const havenoVersion = "1.6.2"; const aliceDaemonUrl = "http://localhost:8080"; const aliceDaemonPassword = "apitest"; const alice: HavenoDaemon = new HavenoDaemon(aliceDaemonUrl, aliceDaemonPassword); -const aliceWalletUrl = "http://127.0.0.1:64840"; // alice's internal haveno wallet for direct testing // TODO (woodser): make configurable rather than randomly generated +const aliceWalletUrl = "http://127.0.0.1:38091"; // alice's internal haveno wallet for direct testing const aliceWalletUsername = "rpc_user"; const aliceWalletPassword = "abc123"; let aliceWallet: any; @@ -530,4 +530,4 @@ function testCryptoPaymentAccount(paymentAccount: PaymentAccount) { function testOffer(offer: OfferInfo) { expect(offer.getId().length).toBeGreaterThan(0); // TODO: test rest of offer -} \ No newline at end of file +}