Browse Source

Enable logging in tests

pull/15/head
B. Blechschmidt 3 years ago
parent
commit
5295721461
  1. 1
      Cargo.toml
  2. 14
      tests/proxy.rs

1
Cargo.toml

@ -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"

14
tests/proxy.rs

@ -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…
Cancel
Save