MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / create_driver_in_cache_custom

Function create_driver_in_cache_custom

rust/tests/cache_unit_tests.rs:48–63  ·  view source on GitHub ↗
(
    cache: &PathBuf,
    driver_name: &str,
    os_label: &str,
    arch_label: &str,
    version: &str,
)

Source from the content-addressed store, hash-verified

46}
47
48fn create_driver_in_cache_custom(
49 cache: &PathBuf,
50 driver_name: &str,
51 os_label: &str,
52 arch_label: &str,
53 version: &str,
54) {
55 let dir = cache
56 .join(driver_name)
57 .join(os_label)
58 .join(arch_label)
59 .join(version);
60 fs::create_dir_all(&dir).unwrap();
61 let ext = if os_label == "windows" { ".exe" } else { "" };
62 fs::write(dir.join(format!("{}{}", driver_name, ext)), b"fake binary").unwrap();
63}
64
65#[test]
66fn find_latest_from_cache_returns_none_when_empty() {

Calls 1

writeFunction · 0.85

Tested by

no test coverage detected