mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-28 09:38:05 +00:00
Enable logging in tests
This commit is contained in:
parent
8be40a1fbd
commit
5295721461
2 changed files with 10 additions and 5 deletions
|
@ -21,3 +21,4 @@ nix = { version = "0.26", features = ["process", "signal"] }
|
||||||
prctl = "1.0"
|
prctl = "1.0"
|
||||||
reqwest = { version = "0.11", features = ["blocking", "json"] }
|
reqwest = { version = "0.11", features = ["blocking", "json"] }
|
||||||
serial_test = "1.0"
|
serial_test = "1.0"
|
||||||
|
test-log = "0.2"
|
||||||
|
|
|
@ -146,7 +146,11 @@ mod tests {
|
||||||
}
|
}
|
||||||
Ok(Fork::Child) => {
|
Ok(Fork::Child) => {
|
||||||
prctl::set_death_signal(signal::SIGKILL as isize).unwrap(); // 9 == SIGKILL
|
prctl::set_death_signal(signal::SIGKILL as isize).unwrap(); // 9 == SIGKILL
|
||||||
main_entry(TUN_TEST_DEVICE, test.proxy, Options::new());
|
main_entry(
|
||||||
|
TUN_TEST_DEVICE,
|
||||||
|
test.proxy,
|
||||||
|
Options::new().with_virtual_dns(),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Err(_) => panic!(),
|
Err(_) => panic!(),
|
||||||
}
|
}
|
||||||
|
@ -163,7 +167,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[serial]
|
#[serial]
|
||||||
#[test]
|
#[test_log::test]
|
||||||
fn test_socks5() {
|
fn test_socks5() {
|
||||||
require_var("SOCKS5_SERVER");
|
require_var("SOCKS5_SERVER");
|
||||||
run_test(
|
run_test(
|
||||||
|
@ -173,7 +177,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[serial]
|
#[serial]
|
||||||
#[test]
|
#[test_log::test]
|
||||||
fn test_http() {
|
fn test_http() {
|
||||||
require_var("HTTP_SERVER");
|
require_var("HTTP_SERVER");
|
||||||
run_test(
|
run_test(
|
||||||
|
@ -183,7 +187,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[serial]
|
#[serial]
|
||||||
#[test]
|
#[test_log::test]
|
||||||
fn test_socks5_dns() {
|
fn test_socks5_dns() {
|
||||||
require_var("SOCKS5_SERVER");
|
require_var("SOCKS5_SERVER");
|
||||||
run_test(
|
run_test(
|
||||||
|
@ -193,7 +197,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[serial]
|
#[serial]
|
||||||
#[test]
|
#[test_log::test]
|
||||||
fn test_http_dns() {
|
fn test_http_dns() {
|
||||||
require_var("HTTP_SERVER");
|
require_var("HTTP_SERVER");
|
||||||
run_test(
|
run_test(
|
||||||
|
|
Loading…
Add table
Reference in a new issue