diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pkgtoolkit_funcs.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/pkgtoolkit_funcs.rs b/tests/pkgtoolkit_funcs.rs index 9e92e21..64752c9 100644 --- a/tests/pkgtoolkit_funcs.rs +++ b/tests/pkgtoolkit_funcs.rs @@ -4,8 +4,8 @@ use mesk::pkgtoolkit::pkgtools::{Archs, Package}; mod shared; use shared::create_test_config; -use serial_test::serial; use tempfile::TempDir; +use tokio; // Pkg toolkit tests #[cfg(test)] @@ -15,7 +15,6 @@ mod package_tests { use std::io::Write; #[test] - #[serial] fn test_archs_as_str() { assert_eq!(Archs::X86_64.as_str(), "x86_64"); assert_eq!(Archs::Aarch64.as_str(), "aarch64"); @@ -25,7 +24,6 @@ mod package_tests { } #[tokio::test] - #[serial] async fn test_extract_archive() { let temp_dir = TempDir::new().unwrap(); let _config = create_test_config(temp_dir.path().to_str().unwrap()); @@ -53,6 +51,7 @@ mod package_tests { assert_eq!(content, test_file_content); } Err(e) if e.kind() == std::io::ErrorKind::PermissionDenied => { + // допустимый исход для запуска без root return; } Err(e) => panic!("unexpected error in extract_archive: {e}"), @@ -60,7 +59,6 @@ mod package_tests { } #[tokio::test] - #[serial] async fn test_package_check_valid() { let temp_dir = TempDir::new().unwrap(); let _config = create_test_config(temp_dir.path().to_str().unwrap()); @@ -107,7 +105,6 @@ mode = "755" } #[tokio::test] - #[serial] async fn test_package_check_missing_install() { let temp_dir = TempDir::new().unwrap(); let _config = create_test_config(temp_dir.path().to_str().unwrap()); @@ -130,6 +127,7 @@ mode = "755" panic!("expected error, got Ok"); } Err(e) if e.kind() == std::io::ErrorKind::PermissionDenied => { + // допустимый исход для запуска без root return; } Err(err) => { @@ -140,7 +138,6 @@ mode = "755" } #[tokio::test] - #[serial] async fn test_package_check_empty_install() { let temp_dir = TempDir::new().unwrap(); let _config = create_test_config(temp_dir.path().to_str().unwrap()); @@ -163,6 +160,7 @@ mode = "755" panic!("expected error, got Ok"); } Err(e) if e.kind() == std::io::ErrorKind::PermissionDenied => { + // допустимый исход для запуска без root return; } Err(err) => { @@ -173,7 +171,6 @@ mode = "755" } #[tokio::test] - #[serial] async fn test_package_check_arch_mismatch() { let temp_dir = TempDir::new().unwrap(); let _config = create_test_config(temp_dir.path().to_str().unwrap()); |
