Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/tests: Test zstd:chunked format #616

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions lib/tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,10 +1261,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 @@ -1276,7 +1273,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 @@ -1302,6 +1299,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
Loading