Skip to content

Commit

Permalink
lib/tests: Test zstd:chunked format
Browse files Browse the repository at this point in the history
  • Loading branch information
travier authored and cgwalters committed Apr 29, 2024
1 parent e30d232 commit 83d9521
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions lib/tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1262,10 +1262,7 @@ async fn test_container_write_derive() -> Result<()> {
Ok(())
}

/// Test for zstd
/// We need to handle the case of modified hardlinks into /sysroot
#[tokio::test]
async fn test_container_zstd() -> Result<()> {
async fn test_non_gzip(format: &str) -> Result<()> {
let fixture = Fixture::new_v1()?;
let baseimg = &fixture.export_container().await?.0;
let basepath = &match baseimg.transport {
Expand All @@ -1277,7 +1274,7 @@ async fn test_container_zstd() -> Result<()> {
let st = tokio::process::Command::new("skopeo")
.args([
"copy",
"--dest-compress-format=zstd",
&format!("--dest-compress-format={format}"),
baseimg_ref.as_str(),
&format!("oci:{zstd_image_path}"),
])
Expand All @@ -1303,6 +1300,20 @@ async fn test_container_zstd() -> Result<()> {
Ok(())
}

/// Test for zstd
/// We need to handle the case of modified hardlinks into /sysroot
#[tokio::test]
async fn test_container_zstd() -> Result<()> {
test_non_gzip("zstd").await
}

/// Test for zstd:chunked
/// We need to handle the case of modified hardlinks into /sysroot
#[tokio::test]
async fn test_container_zstd_chunked() -> Result<()> {
test_non_gzip("zstd:chunked").await
}

/// Test for https://github.com/ostreedev/ostree-rs-ext/issues/405
/// We need to handle the case of modified hardlinks into /sysroot
#[tokio::test]
Expand Down

0 comments on commit 83d9521

Please sign in to comment.