Update deps and fix getaddrinfo test for canary
Apparently the return of getaddrinfo for the canary domain has changed in the latest versions of either glibc or the corresponding crate. The error returned is Eai::NoData rather than Eai::NoName.
This commit is contained in:
parent
cef4f452f2
commit
6582c27a43
|
@ -22,11 +22,11 @@ name = "nss_malcontent"
|
||||||
integration_test = ["dep:zbus_names"]
|
integration_test = ["dep:zbus_names"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
bindgen = "0.60"
|
bindgen = "0.63"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
malcontent-nss = { path = ".", features = ["integration_test"] }
|
malcontent-nss = { path = ".", features = ["integration_test"] }
|
||||||
env_logger = "0.9"
|
env_logger = "0.10"
|
||||||
event-listener = "2.5"
|
event-listener = "2.5"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
rusty-hook = "0.11"
|
rusty-hook = "0.11"
|
||||||
|
@ -36,11 +36,11 @@ tokio = { version = "1", features = ["rt", "sync", "macros", "net", "time"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
gethostname = "0.2"
|
gethostname = "0.4"
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
once_cell = "1.13"
|
once_cell = "1.13"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
nix = { version = "0.24", features = ["socket", "user", "sched"] }
|
nix = { version = "0.25", features = ["socket", "user", "sched"] }
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
tokio = { version = "1", features = ["rt"] }
|
tokio = { version = "1", features = ["rt"] }
|
||||||
trust-dns-resolver = { version = "0.22", features = ["dns-over-rustls"] }
|
trust-dns-resolver = { version = "0.22", features = ["dns-over-rustls"] }
|
||||||
|
|
|
@ -48,7 +48,7 @@ fork_test! {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn application_dns_is_nxdomain() -> Result<()> {
|
fn application_dns_is_nodata() -> Result<()> {
|
||||||
common::setup()?;
|
common::setup()?;
|
||||||
tokio::runtime::Runtime::new().unwrap().block_on(async {
|
tokio::runtime::Runtime::new().unwrap().block_on(async {
|
||||||
let _dbus = common::mock_dbus(HashMap::from([(
|
let _dbus = common::mock_dbus(HashMap::from([(
|
||||||
|
@ -69,8 +69,8 @@ fork_test! {
|
||||||
let error = std::ffi::CStr::from_ptr(gai_strerror(getaddrinfo_status));
|
let error = std::ffi::CStr::from_ptr(gai_strerror(getaddrinfo_status));
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
getaddrinfo_status,
|
getaddrinfo_status,
|
||||||
Eai::NoName.0,
|
Eai::NoData.0,
|
||||||
"Should have gotten no hostname (NXDOMAIN), instead got {}",
|
"Should have gotten no data (NODATA), instead got {}",
|
||||||
error.to_str().unwrap()
|
error.to_str().unwrap()
|
||||||
);
|
);
|
||||||
freeaddrinfo(addr);
|
freeaddrinfo(addr);
|
||||||
|
|
Loading…
Reference in New Issue