disable dht test in CI

This commit is contained in:
Christien Rioux 2023-11-08 08:04:53 -05:00
parent 145295d63b
commit 6f8f636d5d
4 changed files with 18 additions and 2 deletions

View File

@ -191,3 +191,10 @@ pub async fn ptr_lookup(ip_addr: IpAddr) -> EyreResult<String> {
}
}
}
pub fn env_variable_is_defined<S: AsRef<str>>(s: S) -> bool {
match std::env::var(s.as_ref()) {
Ok(v) => !v.is_empty(),
Err(_) => false,
}
}

View File

@ -39,3 +39,7 @@ pub async fn txt_lookup<S: AsRef<str>>(_host: S) -> EyreResult<Vec<String>> {
pub async fn ptr_lookup(_ip_addr: IpAddr) -> EyreResult<String> {
bail!("wasm does not support ptr lookup")
}
pub fn env_variable_is_defined<S: AsRef<str>>(s: S) -> bool {
false
}

View File

@ -334,6 +334,11 @@ async fn wait_for_public_internet_ready(api: &VeilidAPI) {
}
pub async fn test_all() {
if intf::env_variable_is_defined("CI") {
info!("skipping DHT test in CI");
return;
}
let (update_callback, config_callback) = setup_veilid_core();
let api = api_startup(update_callback, config_callback)
.await

View File

@ -12,8 +12,6 @@ pub async fn run_all_tests() {
test_types::test_all().await;
info!("TEST: test_veilid_core");
test_veilid_core::test_all().await;
info!("TEST: test_dht");
test_dht::test_all().await;
info!("TEST: test_veilid_config");
test_veilid_config::test_all().await;
info!("TEST: test_connection_table");
@ -32,6 +30,8 @@ pub async fn run_all_tests() {
veilid_api::tests::test_serialize_json::test_all().await;
info!("TEST: routing_table::test_serialize_routing_table");
routing_table::tests::test_serialize_routing_table::test_all().await;
info!("TEST: test_dht");
test_dht::test_all().await;
info!("Finished unit tests");
}