Skip to content

Commit

Permalink
update snapshots
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 db56e15 commit 5cde105
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 9 deletions.
10 changes: 6 additions & 4 deletions crates/core/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl TestSource {
#[fixture]
fn tar_gz_testdata() -> Result<TestSource> {
let dir = tempdir()?;
let path = Path::new("tests/fixtures/backup-data.tar.gz");
let path = Path::new("tests/fixtures/backup-data.tar.gz").canonicalize()?;
let tar_gz = File::open(path)?;
let tar = GzDecoder::new(tar_gz);
let mut archive = Archive::new(tar);
Expand All @@ -58,7 +58,9 @@ fn tar_gz_testdata() -> Result<TestSource> {

#[fixture]
fn dir_testdata() -> TestSource {
let path = Path::new("tests/fixtures/backup-data/");
let path = Path::new("tests/fixtures/backup-data/")
.canonicalize()
.expect("fixture path");
TestSource::new(path)
}

Expand Down Expand Up @@ -96,7 +98,7 @@ impl<'a> std::fmt::Debug for TestSummary<'a> {
#[rstest]
fn test_backup_with_dir_passes(dir_testdata: TestSource) -> Result<()> {
// uncomment for logging output
SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
// SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
let source = dir_testdata;
let paths = &source.path_list();

Expand Down Expand Up @@ -137,7 +139,7 @@ fn test_backup_with_dir_passes(dir_testdata: TestSource) -> Result<()> {
#[rstest]
fn test_backup_with_tar_gz_passes(tar_gz_testdata: Result<TestSource>) -> Result<()> {
// uncomment for logging output
// SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
let source = tar_gz_testdata?;
let paths = &source.path_list();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/core/tests/integration.rs
assertion_line: 208
expression: TestSummary(&snap_dry_run)
---
TestSnap {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/core/tests/integration.rs
assertion_line: 190
expression: TestSummary(&snap_dry_run)
---
TestSnap {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
source: crates/core/tests/integration.rs
expression: TestSummary(&snap2)
---
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: 5,
total_dirs_processed: 5,
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
@@ -1,6 +1,6 @@
---
source: crates/core/tests/integration.rs
assertion_line: 122
assertion_line: 124
expression: TestSummary(&snap2)
---
TestSnap {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/core/tests/integration.rs
assertion_line: 163
expression: TestSummary(&snap2)
---
TestSnap {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/core/tests/integration.rs
assertion_line: 150
expression: TestSummary(&first_backup)
---
TestSnap {
Expand Down

0 comments on commit 5cde105

Please sign in to comment.