Skip to content

Commit 353086e

Browse files
committed
[rust] Avoid clearing cache in SM tests
1 parent 9f6e80d commit 353086e

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

rust/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ pub trait SeleniumManager {
840840

841841
fn set_offline(&mut self, offline: bool) {
842842
if offline {
843+
self.get_logger().debug("Using Selenium Manager in offline mode");
843844
self.get_config_mut().offline = true;
844845
}
845846
}

rust/tests/offline_tests.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use std::str;
2222
fn offline_test() {
2323
let mut cmd = Command::new(env!("CARGO_BIN_EXE_selenium-manager"));
2424
cmd.args([
25-
"--clear-cache",
2625
"--debug",
2726
"--browser",
2827
"chrome",
@@ -35,5 +34,5 @@ fn offline_test() {
3534
let stdout = &cmd.unwrap().stdout;
3635
let output = str::from_utf8(stdout).unwrap();
3736
println!("{output}");
38-
assert!(output.contains("WARN"));
37+
assert!(output.contains("offline mode"));
3938
}

rust/tests/proxy_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ async fn wrong_proxy_test() {
2929
"chrome",
3030
"--proxy",
3131
"http://localhost:12345",
32-
"--clear-cache",
3332
])
3433
.assert()
3534
.try_success();

rust/tests/timeout_tests.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,16 @@
1717

1818
use assert_cmd::Command;
1919

20-
use exitcode::DATAERR;
21-
2220
#[test]
23-
fn timeout_proxy_test() {
21+
fn timeout_error_test() {
2422
let mut cmd = Command::new(env!("CARGO_BIN_EXE_selenium-manager"));
2523
cmd.args([
26-
"--clear-cache",
2724
"--debug",
2825
"--browser",
2926
"edge",
3027
"--timeout",
31-
"0",
28+
"-1",
3229
])
3330
.assert()
34-
.failure()
35-
.code(DATAERR);
31+
.failure();
3632
}

0 commit comments

Comments
 (0)