diff --git a/client/src/archive.rs b/client/src/archive.rs index 874c2d4..d941016 100644 --- a/client/src/archive.rs +++ b/client/src/archive.rs @@ -198,37 +198,4 @@ pub enum ArchiveAddError { #[cfg(test)] mod tests { use super::*; - use vfs::{MemoryFS, VfsError, VfsPath}; - - const DATA_ROOT: &str = "/home/user/.local/share/save-sync"; - const CONFIG_ROOT: &str = "/home/user/.config/save-sync"; - - #[test] - fn try_default_works() { - let will_error = std::env::var("HOME").is_err(); - let archive = Archive::try_default(); - - assert_ne!(archive.is_ok(), will_error); - } - - #[test] - fn new_works() { - let archive = Archive::new(DATA_ROOT, CONFIG_ROOT); - - assert_eq!(archive.data_root, PathBuf::from(DATA_ROOT)); - assert_eq!(archive.config_root, PathBuf::from(CONFIG_ROOT)); - } - - #[test] - fn track_file_works() {} - - fn create_test_archive(vfs_root: VfsPath) -> Archive { - let data_root = vfs_root.join(DATA_ROOT).unwrap(); - let config_root = vfs_root.join(CONFIG_ROOT).unwrap(); - data_root.create_file().unwrap(); - config_root.create_file().unwrap(); - dbg!(&data_root); - - Archive::new(data_root, config_root) - } } diff --git a/client/src/utils.rs b/client/src/utils.rs index 19eb211..7c45780 100644 --- a/client/src/utils.rs +++ b/client/src/utils.rs @@ -6,19 +6,19 @@ pub fn calc_file_hash(path: &Path) -> Option { unimplemented!() } -pub fn archive_directory(source: &Path, dest: &Path) -> Result<(), Box> { +pub fn archive_directory(src: &Path, dst: &Path) -> Result<(), Box> { unimplemented!() } -pub fn archive_file(source: &Path, dest: &Path) -> Result<(), Box> { +pub fn archive_file(src: &Path, dst: &Path) -> Result<(), Box> { unimplemented!() } -pub fn unarchive_directory(source: &Path, dest: &Path) -> Result<(), Box> { +pub fn unarchive_directory(src: &Path, dst: &Path) -> Result<(), Box> { unimplemented!() } -pub fn unarchive_file(source: &Path, dest: &Path) -> Result<(), Box> { +pub fn unarchive_file(src: &Path, dst: &Path) -> Result<(), Box> { unimplemented!() }