Skip to content

Instantly share code, notes, and snippets.

@abouolia
Last active May 4, 2022 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abouolia/03e1727e5bc296b228788a57f7ad8eb3 to your computer and use it in GitHub Desktop.
Save abouolia/03e1727e5bc296b228788a57f7ad8eb3 to your computer and use it in GitHub Desktop.
Running HavenoClient tests.
Redocumenting the steps to run haveno-ts tests. All these steps are required.
ENVIRONMENT PREPARATION.
-------------
1. Install. these dependencies on your machine `make wget git git-lfs openjdk-11-jdk`, if you ware on Mac just install the `openjdk-11-jdk`.
2. Download `protoc-gen-grpc-web plugin` and make executable as [shown here](https://github.com/grpc/grpc-web#code-generator-plugin).
3. Install `protobuf` compiler v3.19.1 or later for your system:
- mac: `brew install protobuf`
- linux: apt install protobuf-compiler NOTE: You may need to upgrade to v3.19.1 manually if your package manager installs an older version.
HAVENO CLONING
-------------
4. Clone the `haveno` main repository on `~/.git` directory, it's preferred to clone it on theat directory for the next steps.
5. Clone the `haveno-ts` repository to `~/.git` directory too.
HAVENO BINARY BUILDING
-------------
6. `cd haveno` and try to build the binary files of haveno by `make` inside the haveno directory, and wait until the process is completed (this will also download and verify the Monero and Bitcoin binaries).
NETWORK RUNNING
-------------
7. Before running the haveno daemons you should run your the private networks first.
1. In a new terminal window run make `monero-private1`.
2. In a new terminal window run make `monero-private2`.
DAEMONS RUNNING
-------------
8. Now run Haveno daemons instances (**seednode**, **Alice**, **Bob**, **arbitrator**) all are required for HavenoClient tests, if you didn't run on of them the test will try to start the not started once but that makes the testing so heavily to start, so recommended to start all these instances before running the test. everyone in a seperated terminal.
1. `make seednode`
2. `make alice-daemon`
3. `make bob-daemon`
4. `make arbitrator-daemon`
When running Alice, Bob and arbitrator, you'll see a Monero address prompted in the terminal.
9. Now run the funding wallet `make funding-wallet`.
PROXY RUNNING
-----------------
10. In a new terminal, `cd haveno-ts` and start envoy proxy with the config in `haveno-ts/config/envoy.test.yaml` (change absolute path for your system or you don't have to if you were cloned to ~/git dir already): `docker run --rm --add-host host.docker.internal:host-gateway -it -v ~/git/haveno-ts/config/envoy.test.yaml:/envoy.test.yaml -p 8079:8079 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 8084:8084 -p 8085:8085 -p 8086:8086 envoyproxy/envoy-dev:8a2143613d43d17d1eb35a24b4a4a4c432215606 -c /envoy.test.yaml`
TESTS RUNNING
-----------------
11. `cd haveno-ts`
12. `npm install` && `npm run test`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment