reenable ipv6 tests on linux

This commit is contained in:
Benjamin Fry 2024-01-03 21:16:57 -08:00
parent 4d292515a6
commit ea8ba5857f
6 changed files with 6 additions and 24 deletions

View File

@ -10,10 +10,8 @@
use std::env;
use std::fs::File;
use std::io::{Read, Write};
#[cfg(not(target_os = "linux"))]
use std::net::Ipv6Addr;
use std::net::SocketAddr;
use std::net::{IpAddr, Ipv4Addr};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use std::sync::atomic;
use std::sync::Arc;
use std::{thread, time};
@ -50,7 +48,6 @@ fn test_tls_client_stream_ipv4_mtls() {
}
#[test]
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
fn test_tls_client_stream_ipv6() {
tls_client_stream_test(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)), false)
}

View File

@ -193,9 +193,7 @@ impl Connect for AsyncIoTokioAsStd<TokioTcpStream> {
#[cfg(feature = "tokio-runtime")]
mod tests {
use super::AsyncIoTokioAsStd;
#[cfg(not(target_os = "linux"))]
use std::net::Ipv6Addr;
use std::net::{IpAddr, Ipv4Addr};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime;
@ -210,7 +208,6 @@ mod tests {
}
#[test]
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
fn test_tcp_stream_ipv6() {
let io_loop = Runtime::new().expect("failed to create tokio runtime");
tcp_client_stream_test::<AsyncIoTokioAsStd<TokioTcpStream>, Runtime>(

View File

@ -484,9 +484,7 @@ impl<S: DnsTcpStream> Stream for TcpStream<S> {
#[cfg(test)]
#[cfg(feature = "tokio-runtime")]
mod tests {
#[cfg(not(target_os = "linux"))]
use std::net::Ipv6Addr;
use std::net::{IpAddr, Ipv4Addr};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use tokio::net::TcpStream as TokioTcpStream;
use tokio::runtime::Runtime;
@ -503,7 +501,6 @@ mod tests {
}
#[test]
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
fn test_tcp_stream_ipv6() {
let io_loop = Runtime::new().expect("failed to create tokio runtime");
tcp_stream_test::<AsyncIoTokioAsStd<TokioTcpStream>, Runtime>(

View File

@ -417,9 +417,7 @@ async fn send_serial_message_inner<S: DnsUdpSocket + Send>(
mod tests {
#![allow(clippy::dbg_macro, clippy::print_stdout)]
use crate::tests::udp_client_stream_test;
#[cfg(not(target_os = "linux"))]
use std::net::Ipv6Addr;
use std::net::{IpAddr, Ipv4Addr};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use tokio::{net::UdpSocket as TokioUdpSocket, runtime::Runtime};
#[test]
@ -432,7 +430,6 @@ mod tests {
}
#[test]
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
fn test_udp_client_stream_ipv6() {
let io_loop = Runtime::new().expect("failed to create tokio runtime");
udp_client_stream_test::<TokioUdpSocket, Runtime>(

View File

@ -400,9 +400,7 @@ impl DnsUdpSocket for tokio::net::UdpSocket {
#[cfg(test)]
#[cfg(feature = "tokio-runtime")]
mod tests {
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
use std::net::Ipv6Addr;
use std::net::{IpAddr, Ipv4Addr};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use tokio::{net::UdpSocket as TokioUdpSocket, runtime::Runtime};
#[test]
@ -422,7 +420,6 @@ mod tests {
}
#[test]
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
fn test_udp_stream_ipv6() {
use crate::tests::udp_stream_test;
let io_loop = Runtime::new().expect("failed to create tokio runtime");

View File

@ -8,10 +8,8 @@
#![cfg(feature = "dns-over-openssl")]
use std::io::{Read, Write};
#[cfg(not(target_os = "linux"))]
use std::net::Ipv6Addr;
use std::net::SocketAddr;
use std::net::{IpAddr, Ipv4Addr};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use std::sync::atomic;
use std::sync::Arc;
use std::{thread, time};
@ -56,7 +54,6 @@ fn test_tls_client_stream_ipv4_mtls() {
}
#[test]
#[cfg(not(target_os = "linux"))] // ignored until Travis-CI fixes IPv6
fn test_tls_client_stream_ipv6() {
tls_client_stream_test(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)), false)
}