mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-25 13:40:11 +00:00
Merge pull request #606 from fufesou/fix/test-restore-global-options
fix(tests): restore global options
This commit is contained in:
1 file changed
+2
@@ -423,6 +423,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_check_ws() {
|
fn test_check_ws() {
|
||||||
|
let options = Config::get_options();
|
||||||
// enable websocket
|
// enable websocket
|
||||||
Config::set_option(keys::OPTION_ALLOW_WEBSOCKET.to_string(), "Y".to_string());
|
Config::set_option(keys::OPTION_ALLOW_WEBSOCKET.to_string(), "Y".to_string());
|
||||||
|
|
||||||
@@ -551,5 +552,6 @@ mod tests {
|
|||||||
assert_eq!(check_ws("127.0.0.1:23455"), "ws://127.0.0.1:23458");
|
assert_eq!(check_ws("127.0.0.1:23455"), "ws://127.0.0.1:23458");
|
||||||
assert_eq!(check_ws("127.0.0.1:23456"), "ws://127.0.0.1:23458");
|
assert_eq!(check_ws("127.0.0.1:23456"), "ws://127.0.0.1:23458");
|
||||||
assert_eq!(check_ws("127.0.0.1:34567"), "ws://127.0.0.1:34569");
|
assert_eq!(check_ws("127.0.0.1:34567"), "ws://127.0.0.1:34569");
|
||||||
|
Config::set_options(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user