Remove tests for removed with_nym_api_client method

These tests were referencing with_nym_api_client() which was removed when
cleaning domain fronting code from this branch
This commit is contained in:
Tommy Verrall
2025-10-20 11:52:04 +02:00
parent a266137278
commit c448ec823a
-59
View File
@@ -894,63 +894,4 @@ mod tests {
"Builder should succeed without custom client"
);
}
#[test]
fn test_mixnet_builder_with_custom_client() {
let http_client = nym_http_api_client::Client::builder(
nym_http_api_client::Url::parse("https://validator.nymtech.net/api").unwrap(),
)
.expect("Failed to create client builder")
.build()
.expect("Failed to build client");
let builder = MixnetClientBuilder::new_ephemeral().with_nym_api_client(http_client);
assert!(
builder.build().is_ok(),
"Builder should succeed with custom client"
);
}
// Note: Tests for entry_capable_nodes() vs entry_gateways() are in nym-topology crate
// These tests verify the builder functionality only
#[test]
fn test_custom_client_transfer_through_build() {
let http_client = nym_http_api_client::Client::builder(
nym_http_api_client::Url::parse("https://validator.nymtech.net/api").unwrap(),
)
.expect("Failed to create client builder")
.build()
.expect("Failed to build client");
let builder = MixnetClientBuilder::new_ephemeral().with_nym_api_client(http_client);
let disconnected_client = builder.build();
assert!(
disconnected_client.is_ok(),
"Build should transfer custom_nym_api_client successfully"
);
}
#[test]
fn test_builder_storage_transfer_includes_custom_client() {
use nym_client_core::client::base_client::storage::Ephemeral;
let http_client = nym_http_api_client::Client::builder(
nym_http_api_client::Url::parse("https://validator.nymtech.net/api").unwrap(),
)
.expect("Failed to create client builder")
.build()
.expect("Failed to build client");
let builder = MixnetClientBuilder::new_ephemeral().with_nym_api_client(http_client);
let new_storage = Ephemeral::default();
let builder_with_new_storage = builder.set_storage(new_storage);
assert!(
builder_with_new_storage.build().is_ok(),
"set_storage should preserve custom_nym_api_client"
);
}
}