diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd1859..ecec01f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Released on - Pod and container argumets have been removed; from now on you will connect with the following syntax to the provided namespace: `/pod-name/container-name/path/to/file` - [Issue 279](https://github.com/veeso/termscp/issues/279): do not clear screen - [Issue 277](https://github.com/veeso/termscp/issues/277): Fix a bug in the configuration page, which caused being stuck if the added SSH key was empty +- [Issue 272](https://github.com/veeso/termscp/issues/272): `isolated-tests` feature to run tests for releasing on distributions which run in isolated environments ## 0.14.0 diff --git a/Cargo.toml b/Cargo.toml index 0fdf7f2..7defdce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,8 +94,9 @@ cfg_aliases = "0.2" [features] default = ["smb", "with-keyring"] github-actions = [] -with-keyring = ["keyring"] +isolated-tests = [] smb = ["remotefs-smb"] +with-keyring = ["keyring"] [target."cfg(not(target_os = \"macos\"))".dependencies] remotefs-smb = { version = "^0.3", optional = true } diff --git a/src/system/auto_update.rs b/src/system/auto_update.rs index d33ecfc..80e7890 100644 --- a/src/system/auto_update.rs +++ b/src/system/auto_update.rs @@ -145,10 +145,13 @@ mod test { } #[test] - #[cfg(not(all( - any(target_os = "macos", target_os = "freebsd"), - feature = "github-actions" - )))] + #[cfg(all( + not(all( + any(target_os = "macos", target_os = "freebsd"), + feature = "github-actions" + )), + not(feature = "isolated-tests") + ))] fn auto_update() { // Wno version assert_eq!( @@ -162,10 +165,13 @@ mod test { } #[test] - #[cfg(not(all( - any(target_os = "macos", target_os = "freebsd"), - feature = "github-actions" - )))] + #[cfg(all( + not(all( + any(target_os = "macos", target_os = "freebsd"), + feature = "github-actions" + )), + not(feature = "isolated-tests") + ))] fn check_for_updates() { println!("{:?}", Update::is_new_version_available()); assert!(Update::is_new_version_available().is_ok()); diff --git a/src/system/keys/keyringstorage.rs b/src/system/keys/keyringstorage.rs index 20f2486..dd13109 100644 --- a/src/system/keys/keyringstorage.rs +++ b/src/system/keys/keyringstorage.rs @@ -82,6 +82,7 @@ mod tests { use super::*; #[test] + #[cfg(not(feature = "isolated-tests"))] fn test_system_keys_keyringstorage() { let username: String = username(); let storage: KeyringStorage = KeyringStorage::new(username.as_str());