tari-project / tari

The Tari protocol
https://tari.com
BSD 3-Clause "New" or "Revised" License
356 stars 220 forks source link

test: improve test coverage for xxxx_genesis_sanity_check tests #6529

Closed hansieodendaal closed 2 months ago

hansieodendaal commented 2 months ago

Description

Improved test coverage for genesis block sanity checks when run locally in debug or release mode. This PR removed the need for fn XXXX_genesis_sanity_check() tests to be compiled for a specific target network, and for the global static network variable to be set for a target network, i.e. let _ = Network::set_current(Network::Esmeralda);.

cargo.exe test --release --lib blocks::genesis_block will now run all 6x tests serially .

This also works in a CI environment where cargo nextest is called, without any impact on overall runtime performance.

Motivation and Context

All 6x fn XXXX_genesis_sanity_check() tests could not be run with a single target network build.

How Has This Been Tested?

Locally and on CI.

What process can a PR reviewer use to test or verify this change?

Breaking Changes

github-actions[bot] commented 2 months ago

Test Results (CI)

    3 files    129 suites   35m 32s :stopwatch: 1 308 tests 1 308 :white_check_mark: 0 :zzz: 0 :x: 3 922 runs  3 922 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 94bb7c80.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

Test Results (Integration tests)

36 tests   36 :white_check_mark:  15m 29s :stopwatch: 11 suites   0 :zzz:  2 files     0 :x:

Results for commit 94bb7c80.

:recycle: This comment has been updated with latest results.