From 8bb89e7e53c1c3850e118f926bd97eee5b211628 Mon Sep 17 00:00:00 2001 From: Boni Garcia Date: Fri, 17 May 2024 14:56:27 -0700 Subject: [PATCH] [rust] Remove unit tests --- rust/BUILD.bazel | 8 -------- rust/src/firefox.rs | 38 -------------------------------------- 2 files changed, 46 deletions(-) diff --git a/rust/BUILD.bazel b/rust/BUILD.bazel index f3c790285fd11..6cd993e9ca399 100644 --- a/rust/BUILD.bazel +++ b/rust/BUILD.bazel @@ -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", diff --git a/rust/src/firefox.rs b/rust/src/firefox.rs index a976b4aa56948..ebe8e15772e09 100644 --- a/rust/src/firefox.rs +++ b/rust/src/firefox.rs @@ -632,41 +632,3 @@ pub struct GeckodriverRelease { pub max_firefox_version: Option, } -#[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); - }); - } -}