diff --git a/crates/core/tests/fixtures/backup-data/0/9/0 b/crates/core/tests/fixtures/backup-data/0/9/0 deleted file mode 100644 index 187e73b7..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/0 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/1 b/crates/core/tests/fixtures/backup-data/0/9/1 deleted file mode 100644 index fd161476..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/1 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/10 b/crates/core/tests/fixtures/backup-data/0/9/10 deleted file mode 100644 index 07ba19b6..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/10 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/11 b/crates/core/tests/fixtures/backup-data/0/9/11 deleted file mode 100644 index c6777916..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/11 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/12 b/crates/core/tests/fixtures/backup-data/0/9/12 deleted file mode 100644 index e29c9046..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/12 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/13 b/crates/core/tests/fixtures/backup-data/0/9/13 deleted file mode 100644 index 4a897209..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/13 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/14 b/crates/core/tests/fixtures/backup-data/0/9/14 deleted file mode 100644 index 89d20279..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/14 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/15 b/crates/core/tests/fixtures/backup-data/0/9/15 deleted file mode 100644 index 7aa90d69..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/15 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/16 b/crates/core/tests/fixtures/backup-data/0/9/16 deleted file mode 100644 index 3100f737..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/16 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/17 b/crates/core/tests/fixtures/backup-data/0/9/17 deleted file mode 100644 index 5832167a..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/17 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/18 b/crates/core/tests/fixtures/backup-data/0/9/18 deleted file mode 100644 index 9409bc40..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/18 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/19 b/crates/core/tests/fixtures/backup-data/0/9/19 deleted file mode 100644 index f179b64e..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/19 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/2 b/crates/core/tests/fixtures/backup-data/0/9/2 deleted file mode 100644 index 20ae9eec..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/2 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/20 b/crates/core/tests/fixtures/backup-data/0/9/20 deleted file mode 100644 index e7a97c9e..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/20 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/21 b/crates/core/tests/fixtures/backup-data/0/9/21 deleted file mode 100644 index 63ac50e7..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/21 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/22 b/crates/core/tests/fixtures/backup-data/0/9/22 deleted file mode 100644 index e72d5e7e..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/22 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/23 b/crates/core/tests/fixtures/backup-data/0/9/23 deleted file mode 100644 index ae522109..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/23 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/24 b/crates/core/tests/fixtures/backup-data/0/9/24 deleted file mode 100644 index 40f9000b..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/24 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/25 b/crates/core/tests/fixtures/backup-data/0/9/25 deleted file mode 100644 index dd9f68a0..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/25 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/26 b/crates/core/tests/fixtures/backup-data/0/9/26 deleted file mode 100644 index 2d9d6f98..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/26 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/27 b/crates/core/tests/fixtures/backup-data/0/9/27 deleted file mode 100644 index 338a4ed4..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/27 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/28 b/crates/core/tests/fixtures/backup-data/0/9/28 deleted file mode 100644 index caf4ef55..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/28 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/29 b/crates/core/tests/fixtures/backup-data/0/9/29 deleted file mode 100644 index b35dded6..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/29 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/3 b/crates/core/tests/fixtures/backup-data/0/9/3 deleted file mode 100644 index 8f1ff817..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/3 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/30 b/crates/core/tests/fixtures/backup-data/0/9/30 deleted file mode 100644 index 5f48c086..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/30 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/31 b/crates/core/tests/fixtures/backup-data/0/9/31 deleted file mode 100644 index 5439e2b4..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/31 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/32 b/crates/core/tests/fixtures/backup-data/0/9/32 deleted file mode 100644 index d864a459..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/32 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/33 b/crates/core/tests/fixtures/backup-data/0/9/33 deleted file mode 100644 index 91d8882d..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/33 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/34 b/crates/core/tests/fixtures/backup-data/0/9/34 deleted file mode 100644 index ec1f46b4..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/34 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/35 b/crates/core/tests/fixtures/backup-data/0/9/35 deleted file mode 100644 index 0e59da10..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/35 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/36 b/crates/core/tests/fixtures/backup-data/0/9/36 deleted file mode 100644 index d2093405..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/36 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/37 b/crates/core/tests/fixtures/backup-data/0/9/37 deleted file mode 100644 index 7e635b49..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/37 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/38 b/crates/core/tests/fixtures/backup-data/0/9/38 deleted file mode 100644 index 80d2d498..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/38 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/39 b/crates/core/tests/fixtures/backup-data/0/9/39 deleted file mode 100644 index 8142d4e9..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/39 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/4 b/crates/core/tests/fixtures/backup-data/0/9/4 deleted file mode 100644 index bef45cce..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/4 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/40 b/crates/core/tests/fixtures/backup-data/0/9/40 deleted file mode 100644 index 06438593..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/40 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/41 b/crates/core/tests/fixtures/backup-data/0/9/41 deleted file mode 100644 index 3680b415..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/41 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/42 b/crates/core/tests/fixtures/backup-data/0/9/42 deleted file mode 100644 index 36633f22..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/42 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/43 b/crates/core/tests/fixtures/backup-data/0/9/43 deleted file mode 100644 index 15dff47c..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/43 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/44 b/crates/core/tests/fixtures/backup-data/0/9/44 deleted file mode 100644 index f1994014..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/44 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/45 b/crates/core/tests/fixtures/backup-data/0/9/45 deleted file mode 100644 index 64296f1c..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/45 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/46 b/crates/core/tests/fixtures/backup-data/0/9/46 deleted file mode 100644 index a860b151..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/46 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/47 b/crates/core/tests/fixtures/backup-data/0/9/47 deleted file mode 100644 index 390ea25d..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/47 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/48 b/crates/core/tests/fixtures/backup-data/0/9/48 deleted file mode 100644 index d38114ca..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/48 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/49 b/crates/core/tests/fixtures/backup-data/0/9/49 deleted file mode 100644 index 66211998..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/49 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/5 b/crates/core/tests/fixtures/backup-data/0/9/5 deleted file mode 100644 index f5a6028c..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/5 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/50 b/crates/core/tests/fixtures/backup-data/0/9/50 deleted file mode 100644 index bf41444b..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/50 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/51 b/crates/core/tests/fixtures/backup-data/0/9/51 deleted file mode 100644 index 66830624..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/51 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/52 b/crates/core/tests/fixtures/backup-data/0/9/52 deleted file mode 100644 index d1e6fc4c..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/52 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/53 b/crates/core/tests/fixtures/backup-data/0/9/53 deleted file mode 100644 index 7b3fe93f..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/53 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/54 b/crates/core/tests/fixtures/backup-data/0/9/54 deleted file mode 100644 index cd5ad572..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/54 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/55 b/crates/core/tests/fixtures/backup-data/0/9/55 deleted file mode 100644 index e1860e7f..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/55 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/56 b/crates/core/tests/fixtures/backup-data/0/9/56 deleted file mode 100644 index 46ebac48..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/56 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/57 b/crates/core/tests/fixtures/backup-data/0/9/57 deleted file mode 100644 index 5885e2ba..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/57 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/58 b/crates/core/tests/fixtures/backup-data/0/9/58 deleted file mode 100644 index b6f1263b..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/58 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/59 b/crates/core/tests/fixtures/backup-data/0/9/59 deleted file mode 100644 index f20db68f..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/59 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/6 b/crates/core/tests/fixtures/backup-data/0/9/6 deleted file mode 100644 index 203b4855..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/6 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/60 b/crates/core/tests/fixtures/backup-data/0/9/60 deleted file mode 100644 index 199da7fe..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/60 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/61 b/crates/core/tests/fixtures/backup-data/0/9/61 deleted file mode 100644 index 366ae659..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/61 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/62 b/crates/core/tests/fixtures/backup-data/0/9/62 deleted file mode 100644 index 0ced4d2e..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/62 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/63 b/crates/core/tests/fixtures/backup-data/0/9/63 deleted file mode 100644 index 6dc2c702..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/63 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/64 b/crates/core/tests/fixtures/backup-data/0/9/64 deleted file mode 100644 index 8cac6892..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/64 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/65 b/crates/core/tests/fixtures/backup-data/0/9/65 deleted file mode 100644 index ec851232..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/65 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/66 b/crates/core/tests/fixtures/backup-data/0/9/66 deleted file mode 100644 index 32cecc6c..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/66 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/67 b/crates/core/tests/fixtures/backup-data/0/9/67 deleted file mode 100644 index d3795b9b..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/67 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/68 b/crates/core/tests/fixtures/backup-data/0/9/68 deleted file mode 100644 index ed1afe51..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/68 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/7 b/crates/core/tests/fixtures/backup-data/0/9/7 deleted file mode 100644 index 62f04f63..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/7 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/8 b/crates/core/tests/fixtures/backup-data/0/9/8 deleted file mode 100644 index 2a518174..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/8 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/0/9/9 b/crates/core/tests/fixtures/backup-data/0/9/9 deleted file mode 100644 index 57904d2c..00000000 Binary files a/crates/core/tests/fixtures/backup-data/0/9/9 and /dev/null differ diff --git a/crates/core/tests/fixtures/backup-data/tests/empty-file b/crates/core/tests/fixtures/backup-data/tests/empty-file deleted file mode 100644 index e69de29b..00000000 diff --git a/crates/core/tests/fixtures/backup-data/tests/testfile b/crates/core/tests/fixtures/backup-data/tests/testfile deleted file mode 100644 index 6de7b8c6..00000000 --- a/crates/core/tests/fixtures/backup-data/tests/testfile +++ /dev/null @@ -1 +0,0 @@ -This is a test file. diff --git a/crates/core/tests/fixtures/backup-data/tests/testfile-hardlink b/crates/core/tests/fixtures/backup-data/tests/testfile-hardlink deleted file mode 100644 index 6de7b8c6..00000000 --- a/crates/core/tests/fixtures/backup-data/tests/testfile-hardlink +++ /dev/null @@ -1 +0,0 @@ -This is a test file. diff --git a/crates/core/tests/fixtures/backup-data/tests/testfile-symlink b/crates/core/tests/fixtures/backup-data/tests/testfile-symlink deleted file mode 120000 index e7cbb71a..00000000 --- a/crates/core/tests/fixtures/backup-data/tests/testfile-symlink +++ /dev/null @@ -1 +0,0 @@ -testfile \ No newline at end of file diff --git a/crates/core/tests/integration.rs b/crates/core/tests/integration.rs index a54411d5..ffcf8b01 100644 --- a/crates/core/tests/integration.rs +++ b/crates/core/tests/integration.rs @@ -61,14 +61,6 @@ fn tar_gz_testdata() -> Result { Ok(TestSource::new(dir)) } -// TODO!: Remove? -#[fixture] -fn dir_testdata() -> PathBuf { - Path::new("tests/fixtures/backup-data/") - .canonicalize() - .expect("fixture path") -} - // Parts of the snapshot summary we want to test against references struct TestSummary<'a>(&'a SnapshotFile); @@ -100,81 +92,6 @@ impl<'a> std::fmt::Debug for TestSummary<'a> { } } -#[rstest] -fn test_backup_with_dir_passes(dir_testdata: PathBuf, set_up_repo: Result) -> Result<()> { - // uncomment for logging output - // SimpleLogger::init(log::LevelFilter::Debug, Config::default())?; - - // Fixtures - let (source, repo) = (dir_testdata, set_up_repo?.to_indexed_ids()?); - - let paths = PathList::from_iter(Some(source)); - - // we use as_path to not depend on the actual tempdir - let opts = BackupOptions::default().as_path(PathBuf::from_str("test")?); - - // first backup - let first_snapshot = repo.backup(&opts, &paths, SnapshotFile::default())?; - #[cfg(windows)] - assert_debug_snapshot!( - "backup-dir-summary-first-windows", - TestSummary(&first_snapshot) - ); - - #[cfg(not(windows))] - assert_debug_snapshot!("backup-dir-summary-first-nix", TestSummary(&first_snapshot)); - - assert_eq!(first_snapshot.parent, None); - - // tree of first backup - // re-read index - let repo = repo.to_indexed_ids()?; - let tree = repo.node_from_path(first_snapshot.tree, Path::new("test/tests"))?; - let tree = repo.get_tree(&tree.subtree.expect("Sub tree"))?; - - #[cfg(windows)] - assert_debug_snapshot!("backup-dir-tree-windows", tree); - - #[cfg(not(windows))] - assert_debug_snapshot!("backup-dir-tree-nix", tree); - - // get all snapshots and check them - let all_snapshots = repo.get_all_snapshots()?; - assert_eq!(vec![first_snapshot.clone()], all_snapshots); - // save list of pack files - let packs1: Vec<_> = repo.list(rustic_core::FileType::Pack)?.collect(); - - // re-read index - let repo = repo.to_indexed_ids()?; - // second backup - let second_snapshot = repo.backup(&opts, &paths, SnapshotFile::default())?; - - #[cfg(windows)] - assert_debug_snapshot!( - "backup-dir-summary-second-windows", - TestSummary(&second_snapshot) - ); - - #[cfg(not(windows))] - assert_debug_snapshot!( - "backup-dir-summary-second-nix", - TestSummary(&second_snapshot) - ); - - assert_eq!(second_snapshot.parent, Some(first_snapshot.id)); - assert_eq!(first_snapshot.tree, second_snapshot.tree); - - // get all snapshots and check them - let mut all_snapshots = repo.get_all_snapshots()?; - all_snapshots.sort_unstable(); - assert_eq!(vec![first_snapshot, second_snapshot], all_snapshots); - - // pack files should be unchanged - let packs2: Vec<_> = repo.list(rustic_core::FileType::Pack)?.collect(); - assert_eq!(packs1, packs2); - Ok(()) -} - #[rstest] fn test_backup_with_tar_gz_passes( tar_gz_testdata: Result, @@ -205,17 +122,17 @@ fn test_backup_with_tar_gz_passes( assert_eq!(first_snapshot.parent, None); - // // tree of first backup - // // re-read index - // let repo = repo.to_indexed_ids()?; - // let tree = repo.node_from_path(first_snapshot.tree, Path::new("test/tests"))?; - // let tree = repo.get_tree(&tree.subtree.expect("Sub tree"))?; + // tree of first backup + // re-read index + let repo = repo.to_indexed_ids()?; + let tree = repo.node_from_path(first_snapshot.tree, Path::new("test/0/tests"))?; + let tree = repo.get_tree(&tree.subtree.expect("Sub tree"))?; - // #[cfg(windows)] - // assert_debug_snapshot!("backup-tar-tree-windows", tree); + #[cfg(windows)] + assert_debug_snapshot!("backup-tar-tree-windows", tree); - // #[cfg(not(windows))] - // assert_debug_snapshot!("backup-tar-tree-nix", tree); + #[cfg(not(windows))] + assert_debug_snapshot!("backup-tar-tree-nix", tree); // get all snapshots and check them let all_snapshots = repo.get_all_snapshots()?; @@ -292,17 +209,17 @@ fn test_backup_dry_run_with_tar_gz_passes( assert_eq!(snap_dry_run.tree, first_snapshot.tree); let packs: Vec<_> = repo.list(rustic_core::FileType::Pack)?.collect(); - // // tree of first backup - // // re-read index - // let repo = repo.to_indexed_ids()?; - // let tree = repo.node_from_path(first_snapshot.tree, Path::new("test/tests"))?; - // let tree = repo.get_tree(&tree.subtree.expect("Sub tree"))?; + // tree of first backup + // re-read index + let repo = repo.to_indexed_ids()?; + let tree = repo.node_from_path(first_snapshot.tree, Path::new("test/0/tests"))?; + let tree = repo.get_tree(&tree.subtree.expect("Sub tree"))?; - // #[cfg(windows)] - // assert_debug_snapshot!("dryrun-tar-tree-windows", tree); + #[cfg(windows)] + assert_debug_snapshot!("dryrun-tar-tree-windows", tree); - // #[cfg(not(windows))] - // assert_debug_snapshot!("dryrun-tar-tree-nix", tree); + #[cfg(not(windows))] + assert_debug_snapshot!("dryrun-tar-tree-nix", tree); // re-read index let repo = repo.to_indexed_ids()?; diff --git a/crates/core/tests/snapshots/integration__backup-dir-summary-first-nix.snap b/crates/core/tests/snapshots/integration__backup-dir-summary-first-nix.snap deleted file mode 100644 index 6d981dbd..00000000 --- a/crates/core/tests/snapshots/integration__backup-dir-summary-first-nix.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -source: crates/core/tests/integration.rs -expression: TestSummary(&first_snapshot) ---- -TestSnap { - hostname: "", - paths: StringList( - [ - "test", - ], - ), - label: "", - tags: StringList( - [], - ), - files_new: 73, - files_changed: 0, - files_unmodified: 0, - total_files_processed: 73, - total_bytes_processed: 1125674, - dirs_new: 5, - dirs_changed: 0, - dirs_unmodified: 0, - total_dirs_processed: 5, - data_blobs: 70, - tree_blobs: 5, - data_added_files: 1125653, - data_added_files_packed: 78740, -} diff --git a/crates/core/tests/snapshots/integration__backup-dir-summary-first-windows.snap b/crates/core/tests/snapshots/integration__backup-dir-summary-first-windows.snap deleted file mode 100644 index 6d981dbd..00000000 --- a/crates/core/tests/snapshots/integration__backup-dir-summary-first-windows.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -source: crates/core/tests/integration.rs -expression: TestSummary(&first_snapshot) ---- -TestSnap { - hostname: "", - paths: StringList( - [ - "test", - ], - ), - label: "", - tags: StringList( - [], - ), - files_new: 73, - files_changed: 0, - files_unmodified: 0, - total_files_processed: 73, - total_bytes_processed: 1125674, - dirs_new: 5, - dirs_changed: 0, - dirs_unmodified: 0, - total_dirs_processed: 5, - data_blobs: 70, - tree_blobs: 5, - data_added_files: 1125653, - data_added_files_packed: 78740, -} diff --git a/crates/core/tests/snapshots/integration__backup-dir-summary-second-windows.snap b/crates/core/tests/snapshots/integration__backup-dir-summary-second-windows.snap deleted file mode 100644 index 88efa041..00000000 --- a/crates/core/tests/snapshots/integration__backup-dir-summary-second-windows.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -source: crates/core/tests/integration.rs -expression: TestSummary(&second_snapshot) ---- -TestSnap { - hostname: "", - paths: StringList( - [ - "test", - ], - ), - label: "", - tags: StringList( - [], - ), - files_new: 0, - files_changed: 0, - files_unmodified: 73, - total_files_processed: 73, - total_bytes_processed: 1125674, - dirs_new: 0, - dirs_changed: 0, - dirs_unmodified: 5, - total_dirs_processed: 5, - data_blobs: 0, - tree_blobs: 0, - data_added_files: 0, - data_added_files_packed: 0, -} diff --git a/crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap b/crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap deleted file mode 100644 index 4cc57375..00000000 --- a/crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap +++ /dev/null @@ -1,169 +0,0 @@ ---- -source: crates/core/tests/integration.rs -expression: tree ---- -Tree { - nodes: [ - Node { - name: "empty-file", - node_type: File, - meta: Metadata { - mode: Some( - 420, - ), - mtime: Some( - 2024-03-12T22:31:11.115831358+00:00, - ), - atime: Some( - 2024-03-12T22:31:11.115831358+00:00, - ), - ctime: Some( - 2024-03-12T22:31:11.115831358+00:00, - ), - uid: Some( - 501, - ), - gid: Some( - 20, - ), - user: Some( - "runner", - ), - group: Some( - "staff", - ), - inode: 12891863206, - device_id: 16777220, - size: 0, - links: 1, - extended_attributes: [], - }, - content: Some( - [], - ), - subtree: None, - }, - Node { - name: "testfile", - node_type: File, - meta: Metadata { - mode: Some( - 420, - ), - mtime: Some( - 2024-03-12T22:31:11.115939543+00:00, - ), - atime: Some( - 2024-03-12T22:31:11.115939543+00:00, - ), - ctime: Some( - 2024-03-12T22:31:11.115939543+00:00, - ), - uid: Some( - 501, - ), - gid: Some( - 20, - ), - user: Some( - "runner", - ), - group: Some( - "staff", - ), - inode: 12891863207, - device_id: 16777220, - size: 21, - links: 1, - extended_attributes: [], - }, - content: Some( - [ - 649b8b471e7d7bc175eec758a7006ac693c434c8297c07db15286788c837154a, - ], - ), - subtree: None, - }, - Node { - name: "testfile-hardlink", - node_type: File, - meta: Metadata { - mode: Some( - 420, - ), - mtime: Some( - 2024-03-12T22:31:11.116070531+00:00, - ), - atime: Some( - 2024-03-12T22:31:11.116070531+00:00, - ), - ctime: Some( - 2024-03-12T22:31:11.116070531+00:00, - ), - uid: Some( - 501, - ), - gid: Some( - 20, - ), - user: Some( - "runner", - ), - group: Some( - "staff", - ), - inode: 12891863208, - device_id: 16777220, - size: 21, - links: 1, - extended_attributes: [], - }, - content: Some( - [ - 649b8b471e7d7bc175eec758a7006ac693c434c8297c07db15286788c837154a, - ], - ), - subtree: None, - }, - Node { - name: "testfile-symlink", - node_type: Symlink { - linktarget: "testfile", - linktarget_raw: None, - }, - meta: Metadata { - mode: Some( - 134218221, - ), - mtime: Some( - 2024-03-12T22:31:11.116267198+00:00, - ), - atime: Some( - 2024-03-12T22:31:11.116267198+00:00, - ), - ctime: Some( - 2024-03-12T22:31:11.116267198+00:00, - ), - uid: Some( - 501, - ), - gid: Some( - 20, - ), - user: Some( - "runner", - ), - group: Some( - "staff", - ), - inode: 12891863209, - device_id: 16777220, - size: 8, - links: 1, - extended_attributes: [], - }, - content: None, - subtree: None, - }, - ], -} diff --git a/crates/core/tests/snapshots/integration__backup-dir-tree-windows.snap b/crates/core/tests/snapshots/integration__backup-tar-tree-windows.snap similarity index 91% rename from crates/core/tests/snapshots/integration__backup-dir-tree-windows.snap rename to crates/core/tests/snapshots/integration__backup-tar-tree-windows.snap index ee1c4702..6e8fd2bc 100644 --- a/crates/core/tests/snapshots/integration__backup-dir-tree-windows.snap +++ b/crates/core/tests/snapshots/integration__backup-tar-tree-windows.snap @@ -16,7 +16,7 @@ Tree { 2014-11-30T16:03:11+01:00, ), ctime: Some( - 2024-03-12T22:32:55+01:00, + 2024-03-13T00:39:48.791253+01:00, ), uid: None, gid: None, @@ -45,7 +45,7 @@ Tree { 2014-08-09T14:14:20+02:00, ), ctime: Some( - 2024-03-12T22:32:55+01:00, + 2024-03-13T00:39:48.789254100+01:00, ), uid: None, gid: None, @@ -76,7 +76,7 @@ Tree { 2014-08-09T14:14:20+02:00, ), ctime: Some( - 2024-03-12T22:32:55+01:00, + 2024-03-13T00:39:48.789254100+01:00, ), uid: None, gid: None, @@ -104,13 +104,13 @@ Tree { meta: Metadata { mode: None, mtime: Some( - 2024-03-12T22:32:55.218816+01:00, + 2014-08-09T14:14:28+02:00, ), atime: Some( - 2024-03-12T22:32:55.218816+01:00, + 2014-08-09T14:14:28+02:00, ), ctime: Some( - 2024-03-12T22:32:55.218816+01:00, + 2024-03-13T00:39:48.791253+01:00, ), uid: None, gid: None, diff --git a/crates/core/tests/snapshots/integration__dryrun-tar-tree-windows.snap b/crates/core/tests/snapshots/integration__dryrun-tar-tree-windows.snap new file mode 100644 index 00000000..a11e66b4 --- /dev/null +++ b/crates/core/tests/snapshots/integration__dryrun-tar-tree-windows.snap @@ -0,0 +1,129 @@ +--- +source: crates/core/tests/integration.rs +expression: tree +--- +Tree { + nodes: [ + Node { + name: "empty-file", + node_type: File, + meta: Metadata { + mode: None, + mtime: Some( + 2014-11-30T16:03:11+01:00, + ), + atime: Some( + 2014-11-30T16:03:11+01:00, + ), + ctime: Some( + 2024-03-13T00:39:48.793256700+01:00, + ), + uid: None, + gid: None, + user: None, + group: None, + inode: 0, + device_id: 0, + size: 0, + links: 0, + extended_attributes: [], + }, + content: Some( + [], + ), + subtree: None, + }, + Node { + name: "testfile", + node_type: File, + meta: Metadata { + mode: None, + mtime: Some( + 2014-08-09T14:14:20+02:00, + ), + atime: Some( + 2014-08-09T14:14:20+02:00, + ), + ctime: Some( + 2024-03-13T00:39:48.792257400+01:00, + ), + uid: None, + gid: None, + user: None, + group: None, + inode: 0, + device_id: 0, + size: 21, + links: 0, + extended_attributes: [], + }, + content: Some( + [ + 649b8b471e7d7bc175eec758a7006ac693c434c8297c07db15286788c837154a, + ], + ), + subtree: None, + }, + Node { + name: "testfile-hardlink", + node_type: File, + meta: Metadata { + mode: None, + mtime: Some( + 2014-08-09T14:14:20+02:00, + ), + atime: Some( + 2014-08-09T14:14:20+02:00, + ), + ctime: Some( + 2024-03-13T00:39:48.792257400+01:00, + ), + uid: None, + gid: None, + user: None, + group: None, + inode: 0, + device_id: 0, + size: 21, + links: 0, + extended_attributes: [], + }, + content: Some( + [ + 649b8b471e7d7bc175eec758a7006ac693c434c8297c07db15286788c837154a, + ], + ), + subtree: None, + }, + Node { + name: "testfile-symlink", + node_type: Symlink { + linktarget: "testfile", + linktarget_raw: None, + }, + meta: Metadata { + mode: None, + mtime: Some( + 2014-08-09T14:14:28+02:00, + ), + atime: Some( + 2014-08-09T14:14:28+02:00, + ), + ctime: Some( + 2024-03-13T00:39:48.793256700+01:00, + ), + uid: None, + gid: None, + user: None, + group: None, + inode: 0, + device_id: 0, + size: 0, + links: 0, + extended_attributes: [], + }, + content: None, + subtree: None, + }, + ], +}