Skip to content

Commit

Permalink
tor-interface: add tests for arti-client based TorProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Pospesel committed Apr 3, 2024
1 parent 82ec4f4 commit 35b9f95
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions source/gosling/crates/tor-interface/tests/tor_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ use std::io::{Read, Write};
use serial_test::serial;

// internal crates
#[cfg(feature = "arti-client-tor-provider")]
use tor_interface::arti_client_tor_client::*;
#[cfg(feature = "legacy-tor-provider")]
use tor_interface::legacy_tor_client::*;
#[cfg(feature = "mock-tor-provider")]
Expand Down Expand Up @@ -204,6 +206,18 @@ pub(crate) fn onion_service_test(mut tor: Box<dyn TorProvider>) -> anyhow::Resul
Ok(())
}

#[test]
#[cfg(feature = "arti-client-tor-provider")]
fn test_arti_client_bootstrap() -> anyhow::Result<()> {
bootstrap_test(Box::new(ArtiClientTorClient::default()))
}

#[test]
#[cfg(feature = "arti-client-tor-provider")]
fn test_arti_client_onion_service() -> anyhow::Result<()> {
onion_service_test(Box::new(ArtiClientTorClient::default()))
}

#[test]
#[cfg(feature = "mock-tor-provider")]
fn test_mock_bootstrap() -> anyhow::Result<()> {
Expand Down

0 comments on commit 35b9f95

Please sign in to comment.