diff --git a/lib/tests/it/main.rs b/lib/tests/it/main.rs index 835119d5..d1dbbe2e 100644 --- a/lib/tests/it/main.rs +++ b/lib/tests/it/main.rs @@ -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 { @@ -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}"), ]) @@ -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]