mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-15 14:32:46 +00:00
Run tests with GitHub actions
This commit is contained in:
parent
e509a81d67
commit
5cbb13247f
4 changed files with 36 additions and 4 deletions
|
@ -148,15 +148,21 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
fn require_var(var: &str) {
|
||||
env::var(var).expect(format!("{var} environment variable required").as_str());
|
||||
}
|
||||
|
||||
#[serial]
|
||||
#[test_with::env(SOCKS5_SERVER)]
|
||||
#[test]
|
||||
fn test_socks5() {
|
||||
require_var("SOCKS5_SERVER");
|
||||
run_test(|test| test.proxy.proxy_type == ProxyType::Socks5)
|
||||
}
|
||||
|
||||
#[serial]
|
||||
#[test_with::env(HTTP_SERVER)]
|
||||
#[test]
|
||||
fn test_http() {
|
||||
require_var("HTTP_SERVER");
|
||||
run_test(|test| test.proxy.proxy_type == ProxyType::Http)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue