1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Zebrad tests.
//!
//! ## Test categories
//!
//! Tests are organized by module path into four tiers:
//!
//! - **`unit::`** — Fast tests for CLI, config, basic functionality (<1 min).
//! No network or state required.
//!
//! - **`integration::`** — Tests that launch zebrad, check local endpoints,
//! verify database behavior, exercise regtest mode, or run bounded sync
//! checks. No cached blockchain state or runtime lightwalletd dependency
//! required.
//!
//! - **`stateful::`** — Tests that require a cached blockchain state directory
//! or runtime lightwalletd dependency. Run on GCP VMs with persistent disks.
//! (30 min – days)
//!
//! - **`e2e::`** — Full-system tests that depend on public-network peer
//! availability, such as syncs, peer RPCs, trusted-chain checks, checkpoint
//! generation, and lightwalletd full syncs. Run on scheduled or manually
//! selected GCP jobs. (hours – days)
//!
//! ## Running tests
//!
//! ```console
//! # All fast tests (unit + integration) — default profile excludes stateful:
//! cargo nextest run
//!
//! # Specific category:
//! cargo nextest run -E 'test(/^unit::/)'
//! cargo nextest run -E 'test(/^integration::/)'
//! cargo nextest run --profile ci-stateful --run-ignored=all -E 'test(/^stateful::/)'
//! cargo nextest run --profile ci-e2e --run-ignored=all -E 'test(/^e2e::/)'
//!
//! # Specific test:
//! cargo nextest run -E 'test(=integration::sync::sync_one_checkpoint_mainnet)'
//!
//! # CI profiles:
//! cargo nextest run --profile ci # PR tests
//! cargo nextest run --profile ci-stateful --run-ignored=all -E 'test(=stateful::sync::sync_update_mainnet)'
//! cargo nextest run --profile ci-e2e --run-ignored=all -E 'test(=e2e::sync::sync_full_mainnet)'
//! ```