summaryrefslogtreecommitdiff
path: root/tests/pkgtoolkit_funcs.rs
diff options
context:
space:
mode:
authorNamilskyy <alive6863@gmail.com>2025-12-03 21:27:37 +0300
committerNamilskyy <alive6863@gmail.com>2025-12-03 21:27:37 +0300
commit76fa68a3bdc0162fabbe1301e2e2795f9af815ff (patch)
tree1fef37256be8df9ea55ce21e47b2ce097a2440f1 /tests/pkgtoolkit_funcs.rs
parent2c8b804cd61a480501069cdf4d4377f3c2cf30bb (diff)
Attempted to fix tests in CI
Diffstat (limited to 'tests/pkgtoolkit_funcs.rs')
-rw-r--r--tests/pkgtoolkit_funcs.rs11
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());