mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-27 09:16:04 +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"
|
||||
reqwest = { version = "0.11", features = ["blocking", "json"] }
|
||||
serial_test = "1.0"
|
||||
test-log = "0.2"
|
||||
|
|
|
@ -146,7 +146,11 @@ mod tests {
|
|||
}
|
||||
Ok(Fork::Child) => {
|
||||
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!(),
|
||||
}
|
||||
|
@ -163,7 +167,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[serial]
|
||||
#[test]
|
||||
#[test_log::test]
|
||||
fn test_socks5() {
|
||||
require_var("SOCKS5_SERVER");
|
||||
run_test(
|
||||
|
@ -173,7 +177,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[serial]
|
||||
#[test]
|
||||
#[test_log::test]
|
||||
fn test_http() {
|
||||
require_var("HTTP_SERVER");
|
||||
run_test(
|
||||
|
@ -183,7 +187,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[serial]
|
||||
#[test]
|
||||
#[test_log::test]
|
||||
fn test_socks5_dns() {
|
||||
require_var("SOCKS5_SERVER");
|
||||
run_test(
|
||||
|
@ -193,7 +197,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[serial]
|
||||
#[test]
|
||||
#[test_log::test]
|
||||
fn test_http_dns() {
|
||||
require_var("HTTP_SERVER");
|
||||
run_test(
|
||||
|
|
Loading…
Add table
Reference in a new issue