From 65900c95e8fed47f1558facbc8bd7e02746906a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 6 Oct 2018 22:15:03 +0100 Subject: [PATCH] Add scaffolding of the index usage test --- src/backup.rs | 13 +++++++++++++ src/storage.rs | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/backup.rs b/src/backup.rs index ae4fedc..72078c9 100644 --- a/src/backup.rs +++ b/src/backup.rs @@ -47,3 +47,16 @@ impl<'a> Engine<'a> { Ok(()) } } + +#[cfg(test)] +mod should { + + #[test] + fn store_file_where_index_tells_it() { + // fake index, all files stores at the same path + // backup + // see if repo contains one file at the faked path + assert!(false); + } + +} diff --git a/src/storage.rs b/src/storage.rs index 4e31e7f..5cf7f03 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -35,7 +35,7 @@ impl<'a> Index<'a> { fn new() -> Self { Self { file_hashes: HashMap::new(), - file_paths: HashMap::new() + file_paths: HashMap::new(), } } @@ -78,7 +78,7 @@ impl<'a> Index<'a> { source_paths.insert(source_path.to_string()); IndexHashEntry { source_paths, - storage_path: old_entry.storage_path.clone() + storage_path: old_entry.storage_path.clone(), } }, )