- validation tests:
make tests
- validation tests with gas report:
make test-with-gas-report
Invariant test scenarios can be externally configured by customizing following environment variables:
Variable | Default | Description |
---|---|---|
SCENARIO | MultipleDistribution | Type of Invariant Scenario to run: Screening, FundingInvariant, Finalize, MultipleDistribution |
PER_ADDRESS_TOKEN_REQ_CAP | 10 | Percentage of funds available to request per proposal recipient in invariants |
NUM_ACTORS | 20 | Max number of actors to participate in invariant testing |
NUM_PROPOSALS | 200 | Max number of proposals that can be proposed in invariant testing |
LOGS_VERBOSITY | 0 | Details to log 0 = No Logs 1 = Calls details, Proposal details, Time details 2 = Calls details, Proposal details, Time details, Funding proposal details, Finalize proposals details 3 = Calls details, Proposal details, Time details, Funding proposal details, Finalize proposals details, Actor details |
Custom scenario configurations are defined in scenarios directory. For running a custom scenario
make test-invariant SCENARIO=<custom-pool>
For example, to test all invariants for multiple distribution (Roll between each handler call can be max 5000 blocks):
make test-invariant SCENARIO=MultipleDistribution
- run all invariant tests:
make test-invariant-all
- generate basic code coverage report:
make coverage
- exclude tests from code coverage report:
apt-get install lcov
bash ../check-code-coverage.sh