chanmgr, testing: Provide config accessor for testing

The top-level global config is going to want to see whether its
machinations have the right effect.
This commit is contained in:
Ian Jackson 2022-07-27 17:26:14 +01:00
parent 582430d1ac
commit 5e307a0989
2 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@ categories = ["network-programming", "cryptography"]
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
[features]
testing = [ ]
[dependencies]
async-trait = "0.1.2"

View File

@ -24,6 +24,14 @@ pub struct ChannelConfig {
}
impl_standard_builder! { ChannelConfig }
#[cfg(feature = "testing")]
impl ChannelConfig {
/// The padding level (accessor for testing)
pub fn padding(&self) -> PaddingLevel {
self.padding
}
}
#[cfg(test)]
mod test {
// @@ begin test lint list maintained by maint/add_warning @@