Skip to content

Commit

Permalink
push base snapshots ci updates
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 e5033cb commit db56e15
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/core/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::{
sync::Arc,
};
// uncomment for logging output
// use simplelog::{Config, SimpleLogger};
use simplelog::{Config, SimpleLogger};
use tar::Archive;
use tempfile::tempdir;

Expand Down Expand Up @@ -57,9 +57,9 @@ fn tar_gz_testdata() -> Result<TestSource> {
}

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

// Parts of the snapshot summary we want to test against references
Expand Down Expand Up @@ -94,10 +94,10 @@ impl<'a> std::fmt::Debug for TestSummary<'a> {
}

#[rstest]
fn test_backup_with_dir_passes(dir_testdata: Result<TestSource>) -> Result<()> {
fn test_backup_with_dir_passes(dir_testdata: TestSource) -> Result<()> {
// uncomment for logging output
// SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
let source = dir_testdata?;
SimpleLogger::init(log::LevelFilter::Debug, Config::default())?;
let source = dir_testdata;
let paths = &source.path_list();

let repo = set_up_repo()?.to_indexed_ids()?;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
source: crates/core/tests/integration.rs
assertion_line: 208
expression: TestSummary(&snap_dry_run)
---
TestSnap {
hostname: "",
paths: StringList(
[
"test",
],
),
label: "",
tags: StringList(
[],
),
files_new: 0,
files_changed: 0,
files_unmodified: 0,
total_files_processed: 0,
total_bytes_processed: 0,
dirs_new: 0,
dirs_changed: 0,
dirs_unmodified: 1,
total_dirs_processed: 1,
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,30 @@
---
source: crates/core/tests/integration.rs
assertion_line: 190
expression: TestSummary(&snap_dry_run)
---
TestSnap {
hostname: "",
paths: StringList(
[
"test",
],
),
label: "",
tags: StringList(
[],
),
files_new: 0,
files_changed: 0,
files_unmodified: 0,
total_files_processed: 0,
total_bytes_processed: 0,
dirs_new: 1,
dirs_changed: 0,
dirs_unmodified: 0,
total_dirs_processed: 1,
data_blobs: 0,
tree_blobs: 1,
data_added_files: 0,
data_added_files_packed: 0,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
source: crates/core/tests/integration.rs
assertion_line: 122
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: 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,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
source: crates/core/tests/integration.rs
expression: TestSummary(&first_backup)
---
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,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
source: crates/core/tests/integration.rs
assertion_line: 163
expression: TestSummary(&snap2)
---
TestSnap {
hostname: "",
paths: StringList(
[
"test",
],
),
label: "",
tags: StringList(
[],
),
files_new: 0,
files_changed: 0,
files_unmodified: 0,
total_files_processed: 0,
total_bytes_processed: 0,
dirs_new: 0,
dirs_changed: 0,
dirs_unmodified: 1,
total_dirs_processed: 1,
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,30 @@
---
source: crates/core/tests/integration.rs
assertion_line: 150
expression: TestSummary(&first_backup)
---
TestSnap {
hostname: "",
paths: StringList(
[
"test",
],
),
label: "",
tags: StringList(
[],
),
files_new: 0,
files_changed: 0,
files_unmodified: 0,
total_files_processed: 0,
total_bytes_processed: 0,
dirs_new: 1,
dirs_changed: 0,
dirs_unmodified: 0,
total_dirs_processed: 1,
data_blobs: 0,
tree_blobs: 1,
data_added_files: 0,
data_added_files_packed: 0,
}

0 comments on commit db56e15

Please sign in to comment.