Skip to content

Commit

Permalink
update snapshots II
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Mar 12, 2024
1 parent 9c4223d commit e31c9af
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/core/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ fn tar_gz_testdata() -> Result<TestSource> {
Ok(TestSource::new(dir))
}

// TODO!: Remove?
#[fixture]
fn dir_testdata() -> PathBuf {
Path::new("tests/fixtures/backup-data/")
Expand Down
169 changes: 169 additions & 0 deletions crates/core/tests/snapshots/integration__backup-dir-tree-nix.snap
Original file line number Diff line number Diff line change
@@ -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,
},
],
}
Original file line number Diff line number Diff line change
@@ -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,
}
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit e31c9af

Please sign in to comment.