Genesis DAO features three ways of ensuring quality assurance via testing:
- Unit tests on a per-pallet basis
- Integration tests using an external substrate client to run against a docker container
- Manual testing on the UI/Frontend
The unit tests are packaged per pallet.
While the suite is still under development all features submitted as part of a Milestone Proposal are fully tested.
From the root directory of the node, you can test all custom pallets of ours by running these lines:
cd pallets/dao-core && cargo test && cd ../..
cd pallets/dao-assets && cargo test && cd ../..
cd pallets/dao-votes && cargo test && cd ../..
The integration-wrapper
directory contains an integration test suite that
is utilizing the subxt
substrate client. The test cases are located in the
tests
folder - for the time being we have full integration tests for the
dao-core
module.
The integration tests are running against our docker container.
Steps to run it:
- Run
docker compose up
to start a docker container with the node - Wait until all dependencies are installed and the node starts producing blocks
- Enter the
integration-wrapper
directory and runcargo test
The user interface is available at genesis-dao.org. The backend service documentation is available here. Our testnet node is available here.
Compile & run the node by either
- using
cargo release --dev --features local-node && ./target/release/genesis-dao --dev
- or running
docker compose up
Afterwards navigate to to the respective port config on Polkadot.js.org and test the intrinsics.
There are again, different ways of running this - with docker or without.
Dockerized:
- Within the node directory run
docker compose up
and wait for the node to produce blocks - Add the node to a local network using
docker network create genesis && docker network connect genesis genesis-dao
- Run
docker network inspect genesis | grep Gateway
and add the IP address to the.env
file of the frontend repository - Run
docker compose up
in the frontend repository and visit the interface atlocalhost:3000
Running the frontend locally:
- Start the node by either compiling or with docker.
- Run
yarn && yarn dev
in the frontend repository and visit the interface atlocalhost:3000