aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/testdata_live.rs
blob: ced6ff2a0e98265885659fc77a16d8bdb657bd14 (plain)
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
//! Test data, downloaded from the live network, and filtered to reduce its size

#[macro_use]
#[path = "../testdata-live/generated_consts.rs"]
#[rustfmt::skip] // shell script output is nice, but not 100% identical to rustfmt
mod generated_consts;

pub use generated_consts::*;

/// Three test data file contents', one per variety
#[derive(Clone, Debug)]
#[non_exhaustive]
pub struct PerVariety {
    /// Plain consensus
    pub plain: &'static str,

    /// Microdescriptor consensus
    pub md: &'static str,

    /// Vote
    pub vote: &'static str,
}

/// Test data for one (selected) relay
#[derive(Clone, Debug)]
#[non_exhaustive]
pub struct PerRelay {
    /// Nickname
    pub nick: &'static str,

    /// Data for this relay
    pub data: PerVariety,
}