tests: rework the actually useful tests to live in the integration crate

This commit is contained in:
Nils Andreas Svee committed 2026-10-02 14:44:49 +07:00
1 parent 74e7532965
commit 3290a7508a
94 files changed
+1373 -15245

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
use super::*;
#[test]
fn connect_accepts_valid_ttl_config_values() {
for ttl in [None, Some(1), Some(255)] {
let mut config = default_test_config(SocketAddr::from(([127, 0, 0, 1], 9)));
config.socket_config.ttl = ttl;
Client::connect(config).unwrap();
}
}
#[test]
fn connect_rejects_invalid_ttl_values() {
for ttl in [0, 256] {
let mut config = default_test_config(SocketAddr::from(([127, 0, 0, 1], 9)));
config.socket_config.ttl = Some(ttl);
assert!(matches!(
Client::connect(config),
Err(ClientError::InvalidConfig { .. })
));
}
}