This commit is contained in:
veeso
2023-05-09 15:40:21 +02:00
parent 9009002b6e
commit c5eeae74b7
83 changed files with 398 additions and 358 deletions
+10 -10
View File
@@ -3,12 +3,6 @@
//! `config_client` is the module which provides an API between the Config module and the system
// Locals
use crate::config::{
params::{UserConfig, DEFAULT_NOTIFICATION_TRANSFER_THRESHOLD},
serialization::{deserialize, serialize, SerializerError, SerializerErrorKind},
};
use crate::explorer::GroupDirs;
use crate::filetransfer::FileTransferProtocol;
// Ext
use std::fs::{create_dir, remove_file, File, OpenOptions};
use std::io::Write;
@@ -16,6 +10,11 @@ use std::path::{Path, PathBuf};
use std::str::FromStr;
use std::string::ToString;
use crate::config::params::{UserConfig, DEFAULT_NOTIFICATION_TRANSFER_THRESHOLD};
use crate::config::serialization::{deserialize, serialize, SerializerError, SerializerErrorKind};
use crate::explorer::GroupDirs;
use crate::filetransfer::FileTransferProtocol;
// Types
pub type SshHost = (String, String, PathBuf); // 0: host, 1: username, 2: RSA key path
@@ -414,14 +413,15 @@ impl ConfigClient {
#[cfg(test)]
mod tests {
use std::io::Read;
use pretty_assertions::assert_eq;
use tempfile::TempDir;
use super::*;
use crate::config::UserConfig;
use crate::utils::random::random_alphanumeric_with_len;
use pretty_assertions::assert_eq;
use std::io::Read;
use tempfile::TempDir;
#[test]
fn test_system_config_new() {
let tmp_dir: TempDir = TempDir::new().ok().unwrap();