Scaffolding of a test
This commit is contained in:
parent
99e10bd8e0
commit
3c8a8cd57a
2 changed files with 27 additions and 8 deletions
|
@ -4,4 +4,9 @@ Goals:
|
|||
* memory usage limit
|
||||
* encryption by default - asymmetric, creates a keypair for you
|
||||
* deduplication
|
||||
* fuzzy find by file name in stored files
|
||||
|
||||
Implementation:
|
||||
* hash -> file and file -> hash indexes
|
||||
* use vfs to store both db and data files, create a new one when old one too big
|
||||
* start with simple read file -> hash -> encrypt -?> send
|
22
src/main.rs
22
src/main.rs
|
@ -1,12 +1,26 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
|
||||
mod index {
|
||||
use super::*;
|
||||
|
||||
#[cfg(test)]
|
||||
mod should {
|
||||
|
||||
#[test]
|
||||
fn hash_scanned_files(){
|
||||
fn recognize_files_of_same_contents() {
|
||||
let file_source = FileSource::new();
|
||||
|
||||
file_source.add("file name 1", "file contents 1");
|
||||
file_source.add("file name 2", "file contents 1");
|
||||
file_source.add("file name 3", "file contents 3");
|
||||
|
||||
let contents_hasher = FakeContentsHasher::default();
|
||||
|
||||
|
||||
let index = Index::with(file_source, contents_hasher);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue