Skip to content

Commit

Permalink
[rust] Remove unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed May 17, 2024
1 parent dd8b8f8 commit 8bb89e7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
8 changes: 0 additions & 8 deletions rust/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,6 @@ rust_library(
deps = all_crate_deps(normal = True),
)

rust_test(
name = "unit",
size = "small",
crate = ":selenium_manager",
edition = "2021",
tags = ["no-sandbox"],
)

rust_test_suite(
name = "integration",
size = "small",
Expand Down
38 changes: 0 additions & 38 deletions rust/src/firefox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,41 +632,3 @@ pub struct GeckodriverRelease {
pub max_firefox_version: Option<u32>,
}

#[cfg(test)]
mod unit_tests {
use super::*;

#[test]
fn test_driver_url() {
let mut firefox_manager = FirefoxManager::new().unwrap();

let data = vec!(
vec!("0.32.0", "linux", "x86", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux32.tar.gz"),
vec!("0.32.0", "linux", "x86_64", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz"),
vec!("0.32.0", "linux", "aarch64", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux-aarch64.tar.gz"),
vec!("0.32.0", "windows", "x86", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-win32.zip"),
vec!("0.32.0", "windows", "x86_64", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-win64.zip"),
vec!("0.32.0", "windows", "aarch64", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-win-aarch64.zip"),
vec!("0.32.0", "macos", "x86", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-macos.tar.gz"),
vec!("0.32.0", "macos", "x86_64", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-macos.tar.gz"),
vec!("0.32.0", "macos", "aarch64", "https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-macos-aarch64.tar.gz"),
vec!("0.31.0", "linux", "x86", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux32.tar.gz"),
vec!("0.31.0", "linux", "x86_64", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz"),
vec!("0.31.0", "linux", "aarch64", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz"),
vec!("0.31.0", "windows", "x86", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-win32.zip"),
vec!("0.31.0", "windows", "x86_64", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-win64.zip"),
vec!("0.31.0", "windows", "aarch64", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-win64.zip"),
vec!("0.31.0", "macos", "x86", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-macos.tar.gz"),
vec!("0.31.0", "macos", "x86_64", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-macos.tar.gz"),
vec!("0.31.0", "macos", "aarch64", "https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-macos-aarch64.tar.gz"),
);

data.iter().for_each(|d| {
firefox_manager.set_driver_version(d.first().unwrap().to_string());
firefox_manager.set_os(d.get(1).unwrap().to_string());
firefox_manager.set_arch(d.get(2).unwrap().to_string());
let driver_url = firefox_manager.get_driver_url().unwrap();
assert_eq!(d.get(3).unwrap().to_string(), driver_url);
});
}
}

0 comments on commit 8bb89e7

Please sign in to comment.