From e31c9aff61845bc2e0ba27c2d81d3210bc8a557d Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Tue, 12 Mar 2024 23:54:08 +0100 Subject: [PATCH] update snapshots II Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com> --- crates/core/tests/integration.rs | 1 + .../integration__backup-dir-tree-nix.snap | 169 ++++++++++++++++++ ...ration__backup-tar-summary-second-nix.snap | 29 +++ ...ration__dryrun-tar-summary-second-nix.snap | 29 +++ 4 files changed, 228 insertions(+) create mode 100644 crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap create mode 100644 crates/core/tests/snapshots/integration__backup-tar-summary-second-nix.snap create mode 100644 crates/core/tests/snapshots/integration__dryrun-tar-summary-second-nix.snap diff --git a/crates/core/tests/integration.rs b/crates/core/tests/integration.rs index 3e36701e..a54411d5 100644 --- a/crates/core/tests/integration.rs +++ b/crates/core/tests/integration.rs @@ -61,6 +61,7 @@ fn tar_gz_testdata() -> Result { Ok(TestSource::new(dir)) } +// TODO!: Remove? #[fixture] fn dir_testdata() -> PathBuf { Path::new("tests/fixtures/backup-data/") diff --git a/crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap b/crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap new file mode 100644 index 00000000..4cc57375 --- /dev/null +++ b/crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap @@ -0,0 +1,169 @@ +--- +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-tar-summary-second-nix.snap b/crates/core/tests/snapshots/integration__backup-tar-summary-second-nix.snap new file mode 100644 index 00000000..7413b5d5 --- /dev/null +++ b/crates/core/tests/snapshots/integration__backup-tar-summary-second-nix.snap @@ -0,0 +1,29 @@ +--- +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: 1125682, + dirs_new: 0, + dirs_changed: 0, + dirs_unmodified: 6, + total_dirs_processed: 6, + data_blobs: 0, + tree_blobs: 0, + data_added_files: 0, + data_added_files_packed: 0, +} diff --git a/crates/core/tests/snapshots/integration__dryrun-tar-summary-second-nix.snap b/crates/core/tests/snapshots/integration__dryrun-tar-summary-second-nix.snap new file mode 100644 index 00000000..632d04ee --- /dev/null +++ b/crates/core/tests/snapshots/integration__dryrun-tar-summary-second-nix.snap @@ -0,0 +1,29 @@ +--- +source: crates/core/tests/integration.rs +expression: TestSummary(&snap_dry_run) +--- +TestSnap { + hostname: "", + paths: StringList( + [ + "test", + ], + ), + label: "", + tags: StringList( + [], + ), + files_new: 0, + files_changed: 0, + files_unmodified: 73, + total_files_processed: 73, + total_bytes_processed: 1125682, + dirs_new: 0, + dirs_changed: 0, + dirs_unmodified: 6, + total_dirs_processed: 6, + data_blobs: 0, + tree_blobs: 0, + data_added_files: 0, + data_added_files_packed: 0, +}