diff --git a/lib/tests/it/main.rs b/lib/tests/it/main.rs index 835119d5..81444f2d 100644 --- a/lib/tests/it/main.rs +++ b/lib/tests/it/main.rs @@ -1262,10 +1262,8 @@ 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<()> { +/// Implementation of a test case for non-gzip (i.e. zstd or zstd:chunked) compression +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 { @@ -1277,7 +1275,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}"), ]) @@ -1303,6 +1301,18 @@ async fn test_container_zstd() -> Result<()> { Ok(()) } +/// Test for zstd +#[tokio::test] +async fn test_container_zstd() -> Result<()> { + test_non_gzip("zstd").await +} + +/// Test for zstd:chunked +#[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]